Incident Activities showing as Guest user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2023 03:59 AM - edited ‎10-25-2023 04:13 AM
Hi,
I have Scripted REST API & Scripted REST Resource used as listener for Slack events subscription.
When ever someone's replies in slack thread I am reading the reply text and updating Incident record for work_notes field.
gr.work_notes = "Slack Thread Reply: " + replyText;
gr.update();
In Incident Activities, it is showing that text as Guest, which I would like to see as actual slack user name.
Not sure which property I should update along with work_note.
I tried with below code but still it shows as guest in activities section, though it shows Incident is update by mentioned user name.
gr.sys_updated_by = "FirstName.LastName";
gr.autoSysFields(false);
I would like to see same user in Activities section as well.
Any thoughts?
Regards,
Bharat.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2023 04:57 AM
Hello,
The scripted rest API is being triggered via some integration user right. Does the user is present in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2023 10:47 PM
Hi Saurav,
This scripted REST API is a web service that allowing external systems to talk to ServiceNow.
I did not get what you mean by triggered via some integration user. It is a listener and getting called by slack.
I do have all slack users in SN. Even if I hardcode any user, it still not work.
Regards,
Bharat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 11:01 PM
I found way to set user with below code:
gr['work_notes'].setJournalEntry(replyText,"User.Name");