Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Update on Journal fields using a user on record

Harish51
Tera Contributor

I am trying to update the TIme cards which do not have a time worked entry, 

The script I am using does check the time worked entries and updates the record.

However I do not want to update as myself but as a use on the time worked/time card record.

Any ideas? 

2 REPLIES 2

Abhinay1
Giga Expert

Hello, My suggestion is such cases would be impersonate as admin or system admin accounts and run the script.

Regards,

Abhinay

Arav
Tera Guru

Hi,

A few teams prefer not to update sys_updated_on and sys_updated_by fields for data fixes.

If that works, you may want to consider adding the code below to suppress updating these fields.

gr_fix.autoSysFields(false);

P.S - "gr_fix" refers to the Glide Record object of the table being updated.

Thanks,

Arav