Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

add user to watchlist with business rule

Community Alums
Not applicable

Hello everyone,

 

Does anyone know how can I archive this: When the caller id changes, change the watch list to the caller manager?

 I was trying with this code: 

(function executeRule(current, previous /*null when async*/) {
var calleruser = current.caller_id;
var newmanager = calleruser.manager;

if(current.caller_id !== ''){
    current.watch_list = newmanager;
    current.update();
}

})(current, previous);
0 REPLIES 0