- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 12:41 PM
We have odd minor issue in this group like this,
Notice that in red circle was recently updated by me but I never touch that group. I was wondering if that was cause by daily schedule job script created by me that run on [sys_user_group] table to update some value in specific fields that cause trigger on audit update? If so then will use gr.setWorkflow(false); in script work to prevent that audit trail updated and updated by?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 01:13 PM
Hi Bradley,
It is very likely that your scheduled job is doing this. Rather than setWorkflow(false), try autoSysFields(false).
setWorkflow() controls whether business rules and workflows will be triggered when the record is updated.
autoSysFields() determines if the times, counts, (and I believe updated by) are updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2017 06:14 AM
It works like this also, just mark it once for the whole transaction.
var rec = new GlideRecord('some_table');
rec.addQuery('active', true); // example
rec.autoSysFields(false); // do not update automatic fields - leave no footprints
rec.query();
while (rec.next()) {
//do something
rec.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2017 06:15 AM
Good to know. I haven't tried it that way. Thanks.