How to get the sys_id of the system, user_name = system?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 08:41 AM
Hello,
We are trying to stop notifications from firing when the "system" adds a comment.
We added a condition to the notification and want to do some testing.
How can we make it look like the "system" is making the entries?
Here is where we are so far:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 08:54 AM
Hi,
Where is this code running at? Business rule / Script include / workflow etc.
Basically if this code runs in user session then it will have the user name on it, if it runs in system session then it will have system name on it. to make the code run in system session you can change this to async BR or if it is a workflow then add a 2 seconds timer activity before this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 12:13 PM
I was running it as a fix script just to test it.
What I am running into is that it does update the comments as "system" in the sc task, however there is a BR that fires and copies the comments up to the RITM as me! defeating the purpose of making the condition for the notification that fires to not be "system".
The issue we are trying to fix is when a system comment happens on the task, the BR copies that up to the RITM and a notification goes out that we don't want to go out for system comments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 01:43 AM
Instead of Fix script, can you run this in an ondemand Scheduled job , and on the job you can select the user in 'run as' field. There you can add system administrator.
So now your job will run as system admin and the BR also in system session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 05:52 AM
Thank you for your suggestion, I tried that and the comment is recorded as by "System" however the BR that copies the sc_task comments up to the RITM is still using my user name in the RITM comments and we are trying to prevent that.