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.

Why Work Note is Showing from User and Not Admin

jlaps
Kilo Sage

As part of a script of a business rule, we are adding a journal entry using the system administrator account. This has been working for years without issue, but lately the work note is showing as authored by the person that performed the triggering action. We specifically coded this to stop that... what am I doing wrong?

 

current.work_notes.setJournalEntry ("Change Tasks are Assigned OR runbook detected. Auto-Approved!", "an");

 

an is the admin account, but the work note shows from a user? Ideas?

1 REPLY 1

Its_Azar
Tera Guru
Tera Guru

Hi there @jlaps 

 

setJournalEntry(user) used to allow overriding the author, but newer releases ignore the second parameter for security reasons — ServiceNow now forces the journal entry to show the actual logged-in user to prevent impersonation/misleading audit trails.

That’s why you suddenly see the end-user instead of the admin account.

To achieve system-authored notes now, run the journal entry as a script action / scheduled job / workflow context or wrap it in an asynchronous script (like gs.eventQueue() or Script Action), where the system runs it instead of the user.

 

 

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG