how to revert back field values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 06:50 AM
Hi,
We have state field on asset table, i want to revert that field value back there are around 1000 records updated the state values how can i achieve this?
I have audit enabled for state field as well.
Thanks
Tanushree

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 06:57 AM
You can use the HistoryWalker - Scoped, Global | ServiceNow Developers API to walk backwards to the previous value and then set the value in a glide update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 07:01 AM
Thanks for the reply
can you give me an idea, how can i use this api?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 06:57 AM
Hi Aishwarya,
The easiest way will be to write a background/fix script to revert the values for all those records.
You need to glide the records in asset table for which you want to update the state values and then just update those reocrds.
If you need any help with the script then let me know I would be happy to help you.
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 07:01 AM
Thanks for your reply
can you help me with the script?