34 views

Symptoms


Scheduled job is not setting sys_updated_by or sys_updated_on

Environment


Kingston

Cause


The scheduled job has autoSysFields set to false in the script;

while(gr.next()) {
gr.state = '2';
gr.autoSysFields(false);
gr.update();
}

Resolution


Remove the autoSysFields line and the sys_updated_by and the sys_updated_on will say that the incident was updated by 'system' and whatever time the scheduled job ran.


Documentation on autoSysFields, https://docs.servicenow.com/bundle/jakarta-application-development/page/app-store/dev_portal/API_reference/GlideRecord/concept/c_GlideRecordAPI.html

Article Information

Last Updated:2018-09-03 12:39:47
Published:2018-09-03