- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 03:28 AM
How can we update a record without updating its system fields(like sys_updated_by, sys_updated_on)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 06:44 PM
Use
grObj.autoSysFields(false);
This will disable the update of sys_updated_on, sys_updated_by etc.
Please Mark Correct & Helpful, if Applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 04:41 PM
You may find this discussion helpful:
https://community.servicenow.com/community?id=community_question&sys_id=3cd8cb61db5cdbc01dcaf3231f96...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 06:44 PM
Use
grObj.autoSysFields(false);
This will disable the update of sys_updated_on, sys_updated_by etc.
Please Mark Correct & Helpful, if Applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 07:17 PM
Hi,
You can go to background script: System Definition > Scripts - Background and conduct a gliderecord query, for example, find the record, update whatever fields is necessary and then use autoSysFields.
For example:
var gr = new GlideRecord('incident');
gr.addQuery('number', 'INC0012345');
gr.query();
if(gr.next()){
gr.category = 'hardware';
gr.autoSysFields(false);
gr.update();
}
This would find the incident INC001235, set the category as hardware, and then update the record.
The line: gr.autoSysFields(false); prevents those system type fields from updating like sys_updated_on and sys_updated_by.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 08:14 PM
Hello Shadab,
Yes, you can do it by using a function autoSysFields() in your server-side scripting.
Whenever you are updating a record set the autoSysFields() to false.
‘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.
You can use below script:
var gr = new GlideRecord('incident');
gr.addQuery('number', 'INC10010');
gr.query();
if(gr.next())
{
gr.autoSysFields(false);
gr.short_description = 'ServiceNow';
gr.update();
}
I hope this will help you.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response useful to you and help others to find information faster.
Thanks,
Tejas