- 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-06-2020 01:16 PM
Hi,
UserName should be the User ID(user_name) field from the User (sys_user) table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 09:02 AM
You mean the sys_user.user_name (label: User ID) right?
That doesn't work for me, can you provide an example of how you'd call it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2020 01:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2020 09:03 AM
That doesn't work for me, can you provide an example of how you'd call it?