Need to change the created date for the incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 11:08 PM
I need to change the created date for the incident. Is it possible.
Example- INC0145485 created 2023-03-09 need to change it to 2023-03-08.
How to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 05:45 AM - edited 03-09-2023 05:46 AM
@Abhilasha G T You can do it using background script or fix script just need to update the sys_created_on field value.
Below is the sample code for the same
var inc =new GlideRecord('incident');
inc.get('sys_id','record_sys_id');
inc.sys_created_on="Date_need_to_update";
inc.autoSysFields(false);
inc.setWorkflow(false);
inc.update();
Please mark the answer correct/helpful based on Impact.
Regards,
RJ

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 05:46 AM
Hello @Abhilasha G T
You can do this by:
- Exporting the XML version of the record.
- Make the required changes
- Import it back to the instance.
Take a look at the example below.
Here the created time for the company 3Com is 2005-05-24 06:44:46 AM
I exported the XML, and changed it to 26th
You will not be able to do it using a background script though.
If my response has solved your question, please mark it as a solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 11:30 PM
Hi SatyakiBose,
I tried , but its not working.
Regards,
Abhilasha G T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 08:12 AM
Background Script for testing:
var Id= 'sys_id'; // Replace with the actual sys_id var gr = new GlideRecord('Table Name'); |