Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

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.