- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
I have a workflow for ordered items where I need a comment to be added to the Comments field.
However, when I add this to the workflow activity, the comment is posted as the requesting user instead of as the system.
How can I make the workflow add the comment as the system user instead of the user who placed the order?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@asd22 This code works in server side script so should work in workflows as well.
Try the suggestion by @Brad Bowman . If this does not work check the user value . Also confirm that the workflow runs on the same table which record you are updating because if it is not the case the current will not work.
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
This need to be done by :
current.comments.setJournalEntry('Test comment', 'system'); //set the userid of user incase it is not system in your instance.
Refer : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0748347
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
i tried this, but the comment still got posted as the current user:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@asd22 This code works in server side script so should work in workflows as well.
Try the suggestion by @Brad Bowman . If this does not work check the user value . Also confirm that the workflow runs on the same table which record you are updating because if it is not the case the current will not work.
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago