- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 04:51 AM
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;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 03:37 AM - edited 07-26-2024 03:38 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2024 11:36 PM
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