Question on notification

Mani60
Tera Contributor

Hi There,

I have one Requirement on Email Notification, 

 

When the New Request is created at that time Requestor will receive one Out of the box Email, that is Request is opened on Your Behalf, 

 

But Now in my case, for Termination Order Guide  I need to add Some Other recipients in who will receive section. 

When The Termination Request will Rise at that time One custom Notification should send and The Out of the box Notification, should not send(OOB Email should restrict).


But in my case, when i rise Termination Request at that time Custom Notification is Also triggering and The OOB is also triggering, but i don't want OOB Notification here,

 

For that i have set the below condition to restrict the OOB Notification, but which is not working.

 

Mani60_0-1701774586788.jpeg

 

 

 

Can anyone please help me, how can i restrict this OOB Email for Only Termination.

 

Thanks,

2 REPLIES 2

Anil Lande
Kilo Patron

Hi,

You can use Advanced condition on your email notification.

Change view to Advanced View and add below script:

 

answer = true;
var reqItem = new GlideRecord('sc_req_item');
reqItem.addQuery('cat_item','sys_id_of_termination item'); //replace sys_id of catalog item (not order guide)
reqItem.addQuery('request',current.sys_id.toString());
reqItem.query();
if(reqItem.hasNext()){
	answer=false;
}

 

 

Replace sys_id of your cat_item, do not replace sys_id of order guide.

Screenshot 2023-12-05 at 5.17.26 PM.png

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi @Anil Lande 
I have tried this code in Advanced Section but which is also not working, 
the Custom Notification also not triggering (Which have to trigger).

 

What changes i need to do, please let me know

has context menu