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.

how can i set the work notes updated by system administrator

lakng
Tera Contributor

we have a business rule which will set the approvals no longer required, in the business rule we have given the work notes as "approvals are auto mated by system"

but finally the work notes are being updated. but not by the system. with the name of the user who triggered the BR.

so how can i make the work notes updated by system administrator not by the user not triggered the BR

14 REPLIES 14

grChange.work_notes.setJournalEntry("Change Management Approvals are Auto Approved by System", 'Admin');

 

will this work?

Nope, the syntax is wrong, you can't use the user in the second parameter.

ok, but its working. can you correct it Alberto?

Shrutika Surwad
Kilo Guru

Shrutika Surwad
Kilo Guru

var msg = "Change Management Approvals are Auto Approved by System";

gr.work_notes.setJournalEntry(msg, 'Admin');

gr.update();

 

try this