Set watch list with business rule

petterbj_rgmo
Tera Contributor

Hello all,

We are on Helsinki and using inbound actions with the Service Desk Call plugin. In the inbound action I created I am adding a email address to the watch list on the Call form. When the Call type is set to request, I need the email address on the watch list to be added to the watch list on the request item. So basically I want the email address in the watch list to be added to the RITM when it is created. I have tried doing this with a business rule (after) that runs on insert and is run on the sc_req_item table. The code is as follows:

find_real_file.png

I cannot seem to figure out where I am going wrong. Any ideas?

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Here you go. Use this script. This should be a before business rule



var gr1= new GlideRecord("new_call");


gr1.addQuery("transferred_to",current.getValue("request"));


gr1.query();


if(gr1.next()){


current.watch_list=gr1.u_watch_list;


}


View solution in original post

21 REPLIES 21

I actually didn't give it another go yet as I was put on another task by my customer, but as soon as i finish that I will give this a go and let you know.


I got it working using your code