How to Retrieve Previously Changed Data in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi everyone,
I accidentally updated some records in the Incident table using a GlideRecord script. Now, I want to retrieve the previous values of those records before they were changed.
Questions:
Is there a way to get the old values of a record after it has been updated?
Can I use Audit History or any GlideRecord script to retrieve the previous data?
Are there best practices to track and restore changed data in ServiceNow?
Any guidance or examples would be really helpful.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @22M61A05D8
1. If you want to revert the changes you made, you can roll back your script execution from the Script Execution History. ‘Record for rollback’ checkbox must be selected when you run the script; otherwise, this feature will not work.
2. You can use a GlideRecord script to retrieve the previous value of a specific field, but there is one condition: the field must not have been updated after you made the changes. Otherwise, you need to manually review the Audit history.
Regards,
Siva
