- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2020 01:11 PM
Has anyone gotten the userName parameter to work on setJournalEntry? Specifically for a non-privileged account, i.e. not 'admin' or a user with the 'admin' role?
When I try to set a journal entry on a GlideRecord, e.g.
incident.comments.setJournalEntry('this is a comment','bjorn');
incident.update();
the comments get the journal entry, but the second parameter, username, is ignored. I've tried different variations on this, to no avail.
According to the documentation this the right way to add a journal entry, but the docs don't specify what a valid 'userName' value might look like. Is there additional documentation that specifies the right way to do this? Or does the username simply not work?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 10:22 AM
OOB there is ACL on sys_journal_field. please take a look at below
https://YourInstanceName.service-now.com/nav_to.do?uri=%2Fpersonalize_all.do%3Fsysparm_rules_table%3Dsys_journal_field%26sysparm_rules_label%3Dsys_journal_field
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 10:22 AM
OOB there is ACL on sys_journal_field. please take a look at below
https://YourInstanceName.service-now.com/nav_to.do?uri=%2Fpersonalize_all.do%3Fsysparm_rules_table%3Dsys_journal_field%26sysparm_rules_label%3Dsys_journal_field
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 10:57 AM
For Admins it will work. For non-admin you will have to create a new ACL of type write on sys_journal_field table. Better not to as this would then open the fields to be updated by non-admins as well for journal fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 07:38 AM
Thanks! I have found one caveat: if you add a comment during creation of a record, it appears that the setJournalEntry() ignores the second parameter no matter what.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi
Did you solve this issue?
I'm facing this right now. I need to insert a comment as another user, but doesn’t work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Even i am not able to get the UserID in the work note for work_notes.setJournalEntry. It is ignoring the User ID