Dynamic condition script - Targeted Recipient List

Kri
Tera Guru

I want to create a new Recipient list where from the Script I have to check the Product selected at Major Issue Management level and have to populate the list of customers having the same product

I want to create one Recipient list that will return all the Customers irrespective of the Selected product in MIM level

I wrote the below script, correct me where I'm going wrong?

Krishna124_0-1685097660340.png

 

8 REPLIES 8

@Kri ,

 

The dot walk that is specified in script is wrong, you need to correct it to get contacts

grd.product.ref_sn_prd_invt_product_inventory.contact

 

In this script how can I specify this script should run for table 'sn_customerservice_case'?
 
(function(){

var list=[];
    var grd = new GlideRecord('sn_prd_invt_product_inventory_list'); 
        grd.addEncodedQuery('prd_offering.sys_id=' + current.product.prd_offering + '^account.sys_id=' + current.account.sys_id + '^contactISEMPTY');
        grd.query();
        while(grd.next()){
             list.push(grd.product.ref_sn_prd_invt_product_inventory.account);
        }
 var obj = {'internal' :  list}; 
    return obj; 
   
    })();

@Kri ,

 

The script is to create a recipient list so it only would use entities like users , accounts, consumers and contacts.

why would you run it for cases?