Can you update a record without updating its system fields(like sys_updated_by, sys_updated_on)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2018 02:34 AM
Thank You !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2018 02:45 AM
HI Soup
Please check the below link it may help you
https://community.servicenow.com/community?id=community_question&sys_id=fafac7addb5cdbc01dcaf3231f96195d
https://www.servicenowguru.com/scripting/gliderecord-query-cheat-sheet/
If so, please mark the response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2018 02:46 AM
Hi
Have a look at :
- https://community.servicenow.com/community?id=community_question&sys_id=fafac7addb5cdbc01dcaf3231f96195d
- https://www.servicenowguru.com/scripting/gliderecord-query-cheat-sheet/
Thanks,
Dravvy
Please Hit Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2018 11:23 PM
autoSysFields
‘autoSysFields’ is used to disable the update of ‘sys’ fields (Updated, Created, etc.) for a particular update. This really is only used in special situations. The primary example is when you need to perform a mass update of records to true up some of the data but want to retain the original update timestamps, etc.
var gr = new GlideRecord('incident');
gr.addQuery('category', 'software');
gr.query();
while(gr.next()){
gr.category = 'hardware';
gr.autoSysFields(false);
gr.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2018 12:54 AM
HI,
You can use
autoSysFields(false); and setWorkflow(false);
This will do your work.
Thanks,
Ashutosh Munot