Add automated comments/updates as Admin user instead of last user

Janel2
Mega Expert

When updating the comments, work_notes, or whatever fields, via a Workflow, UI Action, Business Rule, etc. is there a way to have the updates be added (at least appear to be added) as the the Admin or some other system user?

A bunch of our UI Actions, jobs, BR's, and especially workflows, will update a record with a current status or some other user-friendly update.   Like if a manager approval is required, a quick "Manager approval is required" will be added as a comment or work note.   The problem is, the comment/update appears as the user that initiated that action, even if it is the system technically writing it.

This confuses our users, especially on more complex updates referencing other tables/tasks (really, totally, especially when wait for activities are involved!).   Users think that a workflow update is actually coming from a real user and not the workflow, because, well, the update was added using a the name of a real user.

I mostly get why it is like that (because technically they are initiating the update, etc. etc.).

For the love of Pete, please don't tell me this has to be a full blown impersonation (and likely requires the user initiating the update to have the role).

7 REPLIES 7

Hi Gary



Do you have this working?



If I run the script as an admin, and impersonate another user, it works fine.



The script is ran when a "Resolve" button is clicked.   If I click this as a user without the impersonate ability, the impersonation does not work.



Any help would be apprectiated



Thanks


Use below it will work



var msg = "Ticket is auto-resolved as per rule"


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


gr.update();


omar10148
Tera Contributor

hi, 

you can use this : 

current.work_notes.setJournalEntry(""messages"", 'System User');
Sincerly