- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 05:01 AM
I'm trying to auto populate the watchlist on an incident on assignment based on 2 things 1) the assigned group and 2) the priority of a call. This is going to be a business rule for us.
My code isn't working yet and because of rustiness I can't figure out where I've gone wrong. Appreciate the help on this
addToWatchList();
function addToWatchList() {
If (current.sys_user_group == 'TeamName') {
var wList = current.watch_list.split(',');
var addMe = current.u_escalation_assigned_to;
wList.push(addMe);
current.watch_list = wList.join(',');
current.u_escalation_assigned_to = '';
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 05:06 AM
Hi Sean,
Please try this out and let me know
addToWatchList();
function addToWatchList() {
if(current.assignment_group.getDisplayValue() == 'TeamName') {
var watchlist = current.watch_list;
var addMe = current.u_escalation_assigned_to;
current.watch_list = watchlist + "," + addMe;
current.u_escalation_assigned_to = '';
}
}
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2017 12:39 AM
this thread can be closed. thanks for all the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2017 12:59 AM
You just need to mark something as the correct answer and it will then be ticked as "answered", I believe.