We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to update custom fields without update system fields.

SyedMahemoH
Tera Expert

Here below I pasted the code for your reference,

var gr = new GlideRecord('incident');

gr.addQuery('number','IN00....');

gr.query();

if(gr.next())

{

gr.short_description = "my laptop is not working";

}

 

1 REPLY 1

SanjivMeher
Mega Patron

You can use gr.autoSysFields(false) to update fields without update system fields.

var gr = new GlideRecord('incident');

gr.addQuery('number','IN00....');

gr.query();

if(gr.next())

{

gr.short_description = "my laptop is not working";

gr.autoSysFields(false);

gr.update();

}


Please mark this response as correct or helpful if it assisted you with your question.