Audit history is not captured when bulk records are updated through fix script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 11:30 PM
HI,
I am trying to update 3 fields on 6k records through fix script , but audit history is not captured on few records and it is causing to revert back the value to empty by other sources .
Kindly help how to fix the issue.
Thanks,
Prakash.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 11:40 PM
Hey @AnveshKumar M ,
No , I have not used setworkflow(false), sysautofields(false) in my fix script.
Thanks,
Prakash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 05:48 AM
Prakash - are you able to manually update those fields and save? From the sounds of it ("...not captured on few records, revert back the value to empty...") you have something (BR, ACL, Data Policy) that is not allowing these updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 02:07 AM
Hi! Did you ever find out more about the issue? And would you mind sharing what you know? I have seen a comparable issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 02:24 AM
Hi @Natascha deJ ,
You can check below if audit history didnt get created.
1. If setworkflow(false) or sysautofields(false) used in your script then it wont create audit.
2. Table audit is disable then wont create audit history.
3. no_audit configured at dictionary level then wont create audit history.
5. Table should not have type field as collection then wont create audit history.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 04:02 AM
Hi!
Thank you very much for your reply. In the meantime we had identified the issue. It was indeed due to the setWorkflow(false), which was called in a while loop - in an if statement. And because it wasn't set to true after the update, once it would be evaluated false, it remained false for the rest of the while loop.