- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 11:25 AM
Because of the way my organization has chosen to escalate incidents to sysadmins and netadmins, I need to figure out how to automatically add users in the System Administrators and Network Administrators groups to the work notes list. I've got every other element of the escalation model configured except for this part. Currently the netadmins and sysadmins have to manually assign themselves to the work notes list. Otherwise they won't get updates when the work notes are updated by other members of IT (help desk, other admins, etc.). The problem is, a lot of times they forget to add themselves to the work notes list so I'd like to automate that function but I CANNOT seem to figure out how to do it. Any help would be greatly appreciated.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 12:26 PM
Okay, in that case, the modified script is
Step1: Create an BEFORE business rule and select advanced checkbox to true, insert and update to true
Filter condition : work notes | changes
Step 2: Enter the below script in the business rule script section area.
(function executeRule(current, previous /*null when async*/) {
var watchList = current.work_notes_list.getDisplayValue();
var caller = gs.getUserID();
var out = watchList.search(caller);
if(out == -1)
{
current.work_notes_list += ',' + caller;
}
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2017 06:40 AM
You are very welcome Kevin. Thanks for participating in the community!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2017 10:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 01:10 AM
Hi Kevin and Pradeep
I actually thought that that was what the if statement checked?!
- doesn't "if (out==-1)" check if the current user is in the worknotes list?
-Jesper