meaning and useful of the code

Geethika
Tera Contributor

answer = true;
if (GlidePluginManager.isActive('com.sn_cs_sm')){
answer = new sn_cs_sm.ServiceManagementIncidentUtils().isValidCallerForIncNotif(current.caller_id.getRefRecord());
}

Could anyone please explain me what is the use of this code , this is in the out of the box notifications under advanced conditions.

2 REPLIES 2

palanikumar
Mega Sage

Hi,

 

if (GlidePluginManager.isActive('com.sn_cs_sm')){ - Check whether "Customer Service with Service Management" plugin is active

answer = new sn_cs_sm.ServiceManagementIncidentUtils().isValidCallerForIncNotif(current.caller_id.getRefRecord()); - Check whether user record class is customer_contact or csm_consumer_user.

 

So this check whether user record is created under child class customer contact or csm consumer user table if the relevant plugin is active  

Thank you,
Palani

austinbuono
ServiceNow Employee
ServiceNow Employee

I have tested and found out that if its a customer_contact record the email will not send.  If the caller_id is a user the email will send.