Bulk Update Fix Scripts - Work notes should be updated by system user? URGENT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Experts,
I'm writing a bulk closure script for incident and sc tasks, i want to add comments to the tasks as a system user. currently it takes logged in users name. I tried with setJournalField
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Check this thread on running a scheduled script execution for running as system user: https://www.servicenow.com/community/itsm-forum/scheduled-script-execution-run-as-system-user/td-p/2...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @saint
autoSysFields(false): It is a GlideRecord method used in scripts to prevent system metadata fields—such as sys_updated_on, sys_updated_by, and sys_mod_count—from being updated when a record is modified. It is commonly used for data fixes or silent updates to avoid altering record history
Also few tips when running fix scripts to update records in bulk :
Test in Sub-Prod: Run this script in a lower environment (Dev/QA) first.
setWorkflow(false): This prevents triggering unnecessary notifications, SLA updates, or related Business Rules.
Use setLimit(100): Initially, only update a small batch like 50/100 to ensure the code behaves as expected.
autoSysFields(false)
