Question on notification

Mani60
Tera Contributor

Hi ALL,


I Have Created Custom Notification For Termination Order Guide on sc_request Table, which should trigger when the form Gets submitted(Request is created on Your Behalf for Termination), this notification should only trigger when the Item is Termination,

 

If I create Other Catalog Item Requests at that time, OOB Notification Should Trigger.

But in my case when I create a Request for Termination, the custom Notification is Triggering which is correct.
But when I create a Request Other Than Termination at that time OOB Notification should Trigger but which is not triggering.

I'm Not sure, what is causing this Please find the Snapshot for Triggering Conditions of 2 Notifications,
1) First Notification is for OOB Notification, 2) Second Notifications For Custom Notification.

OOB Notification:

Mani60_0-1702019864763.png

 

Custom Notification:

Mani60_1-1702019635600.png

 

Can anyone please help me on this.

Thanks,

 

 

1 ACCEPTED SOLUTION

Prashant Ahire
Kilo Sage

Hi @Mani60 

Your  OOB Notification was not triggered because you are making the script condition false. i.e the notification is not getting executed. 

 

This is the updated script for OOB Notification

 

 

var gr = new GlideRecord("sc_req_item");
gr.addQuery("request",current.sys_id);
gr.addQuery("cat_item", "97fb2c591bfb6050772853de034bcb61");
gr.query();
if(gr.next()){
answer = false; //if the item is termination then oob will not trigger
} else{
answer = true; // if item is other then termination then oob will trigger
}

 


Please check and Mark Correct and Helpful if it really helps you.
Regards,
Prashant Ahire

 

View solution in original post

1 REPLY 1

Prashant Ahire
Kilo Sage

Hi @Mani60 

Your  OOB Notification was not triggered because you are making the script condition false. i.e the notification is not getting executed. 

 

This is the updated script for OOB Notification

 

 

var gr = new GlideRecord("sc_req_item");
gr.addQuery("request",current.sys_id);
gr.addQuery("cat_item", "97fb2c591bfb6050772853de034bcb61");
gr.query();
if(gr.next()){
answer = false; //if the item is termination then oob will not trigger
} else{
answer = true; // if item is other then termination then oob will trigger
}

 


Please check and Mark Correct and Helpful if it really helps you.
Regards,
Prashant Ahire