Why Work Note is Showing from User and Not Admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
