Add caller to Watchlist

harishbabu20
Tera Contributor

In the Incident if the "Caller" name is changed to different Caller then add the previous caller & logged in user to "Watch list".

 

How to do this via business rule, dot walking or client script or any other methods?

1 REPLY 1

Paul Curwen
Giga Sage

Write a Before Business Rule with Update Checked on the When to run tab

Also on the When to run tab add Filter Condition Affected End User is not empty

On the Advanced tab add this to the Script field.:

 

(function executeRule(current, previous /*null when async*/) {   
if(current.caller_id!=previous.caller_id) {
 
if (current.watch_list == ''){   
       current.watch_list += previous.caller_id;   
        } else {   
        current.watch_list += ',' + previous.caller_id;   
        }   
}
 
})(current, previous); 

 

 

 

 

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul