- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2016 07:51 AM
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:
I cannot seem to figure out where I am going wrong. Any ideas?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2016 08:24 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 12:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 12:33 AM
I have written this script in the RITM table and it works fine for me(Before insert/update type business rule).
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
var gr1 = new GlideRecord('new_call');
gr1.addQuery('transferred_to',current.request);
gr1.query();
if(gr1.next()){
current.watch_list = gr1.u_watch_list;
}
}
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 12:46 AM
So, just to be clear. You are creating a Call record, setting Call Type = Request and choosing a Request item. Then you go to the request, and further more to the RITM. On the RITM the email on the watch list from the call record is in the RITM watch list? Is this the case? If yes, then I am not sure what is not setting my watch list. Just tested the same code you gave me. No luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 12:55 AM
1.I have created a call list record.Added a user in u_watch_list field and a REQ number in the transferred to field.
2.Then I have opened the REQ number that is attached in the Call record.Opened the RITM record that is attached with this REQ.
And modified some value in the RITM form (as the business rule is before insert/update type after updating any field in the RITM form it will run).
Then the user I have selected in the u_watch_list field copied in the watch_list field of the RITM form.
make sure u_watch_list field in the Call table is referenced to sys_user table then the script I have provided to you will work.
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 12:58 AM
Do you think it will work by adding a custom email address, and not a ServiceNow user?
Like; adding "external.user@domain.com" and not "Abel tutor"?