
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2018 07:19 AM
We have 3 Approval Rejected Email Notifications that I don't want to go out if it is for a specific catalog item. I put the script in all 3 and it seems to be working fine, but then only to discover that by having the script in all 3 it is not sending the emails if any other catalog item has been rejected. Not sure why Approval Rejected 2 is giving me such a headache.
Any ideas?
Here is the script that I have inside of the notification
answer = true;
var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.sys_id);
gr.query();
if (gr.next()) {
if (gr.cat_item.sys_id == "b5f2537d0fb6d700fbe937f692050e2d" )
answer = false;
else
answer = true;
}
Issue: By having the script in all 3 notifications, it will not fire the rejection emails for any catalog item. If I remove the script from the Approval rejected 2 email it works just fine for everything (but the problem here is it is still going out for the specific catalog item) and I don't want that. Not sure why only that notification is giving me a problem.
Here are the 3 email notifications
These notifications all sit on the approval table
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2018 10:55 AM
I'm not sure that you need to do a query.
Try this:
answer = true;
if (current.sysapproval.cat_item == "b5f2537d0fb6d700fbe937f692050e2d" ) {
answer = false;
}else
answer = true;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2018 10:55 AM
I'm not sure that you need to do a query.
Try this:
answer = true;
if (current.sysapproval.cat_item == "b5f2537d0fb6d700fbe937f692050e2d" ) {
answer = false;
}else
answer = true;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2018 11:17 AM
Thank you much. This worked perfectly no query needed.