Add automated comments/updates as Admin user instead of last user
This content was last updated in 2024. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2017 09:01 AM
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).
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2018 12:26 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2018 03:06 AM
Use below it will work
var msg = "Ticket is auto-resolved as per rule"
gr.work_notes.setJournalEntry(msg, 'Admin');
gr.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2024 05:00 AM
hi,
you can use this :