Need to change the created date for the incident.

Abhilasha G T
Tera Contributor

 

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.

5 REPLIES 5

Rahul RJ
Giga Sage

@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

SatyakiBose
Mega Sage

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

SatyakiBose_0-1678369486036.png

I exported the XML, and changed it to 26th

SatyakiBose_1-1678369533999.png

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

 

 

Hi  SatyakiBose,

I tried , but its not working.

 

Regards,

Abhilasha G T

 

 

Tried this one and worked like magic thanks!

recommend this solution, safe and easy to do. 🙂

 

1. Export xml

2. open the xml on notepad or any tools you're comfortable of using and look for the "created" field and change it, don't forget to save it

markhernand_1-1759819974081.png

 

3. upload the record by choosing the import xml option.

markhernand_0-1759819887988.png

4. Lastly, verify if it is now updated