- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 11:15 PM - edited 12-07-2023 11:18 PM
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:
Custom Notification:
Can anyone please help me on this.
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 01:11 AM - edited 12-08-2023 01:12 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 01:11 AM - edited 12-08-2023 01:12 AM
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