record producer hard code an email address to the watchlist

Carol2
Tera Contributor

Hi, 

 

I have a requirement to hardcode an email address to the watchlist for a record producer. Adding the below code to the record producer script does not work, please assist 

 

var add_mail = " cc@joe.com"

current.watch_list = current.watch_list+','+producer.add_email;

 
Regards 
C.
1 ACCEPTED SOLUTION

Hi @Carol2 ,

 

The above code which I provided was of Record Producer script which is server side.

In UI policy you have to use client side code that is the reason why it is not working.

 

Try to set that up in producer script as below:

 

 

if(producer.u_caller == 'sysid_of_user1' || producer.u_caller == 'sysid_of_user2' || producer.u_caller == 'sysid_of_user3'){

    var add_mail = "cc@joe.com";
    var emailArrList = [];
    emailArrList.push(add_mail);
    current.watch_list = emailArrList.join();

}

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

View solution in original post

10 REPLIES 10

Carol2
Tera Contributor

Hi, 

 

I want to add another email address to this script but its not working what am i missing?

 

else if(producer.u_caller == 'sysid_of_user1' || producer.u_caller == 'sysid_of_user2' || producer.u_caller == 'sysid_of_user3'){

var add_mail2 = "cc@james.com";
var emailArrList2 = [];
emailArrList2.push(add_mail);
current.watch_list = emailArrList2.join();

}

 

the email address does not populate on the watch