- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2021 11:59 AM
Hello,
I noticed that a record that was associated to a workflow was deleted some time ago. I can easily create the record again but it generates a new Sys iD. This record is tied to a catalog item workflow to process that used the records previous Sys ID. Instead of replacing the sys ID with the new one in the workflow's script, can I just simply use the previous Sys ID I get from my Dev instance and replace it with the new one in Prod? If so, how do I go about it or if this is something I cannot do or is suggested, whats the best course of action to update the Sys ID with a new one in a workflow's script? Just replace it with the new one?
Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2021 02:50 PM
Did you get a chance to review my response.
If my answer helped you, kindly mark it as correct and close this thread.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2021 12:06 PM
Hi Peter B,
Have you tried Undelete the record from Navigator -> Deleted Records?
Thank you
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2021 12:10 PM
Thank you, I tried to look but I didnt see it there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2021 12:12 PM
Hi Peter
Search your sys_id in Document key field in Audit deleted records table.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2021 12:06 PM
yes you can. use setNewGuidValue()
Sample code:
var gr = new GlideRecord('incident');
gr.initialize();
gr.setNewGuidValue('bf2e6d2c2f47f810f68d5ff62799b61c'); // your previous sys_id
gr.autoSysFields();
gr.insert();