- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 11:37 PM
How to exclude OOB notifications for some catalog items. I tried SysID is not in conditions but it is not working.
Notification is configured in Sc_request Table. Any help will be highly appreciated
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2019 03:45 AM
You will need to change script as following, also add proper SYS IDs
answer = checkResult();
function checkResult(){
var gr = new GlideRecord('sc_req_item');
gr.addEncodedQuery('request='+current.sys_id+'^cat_itemIN060f3afa3731300054b6a3549dbe5d3e,060f3afa3731300054b6a3549dbe5d3e'); //Replace with a comma separated list of your catalog item SYS IDs
gr.query ();
if (gr.next())
return false;
else
return true;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 11:42 PM
Hi,
please check the thread below, it will show you how to do that:
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 11:44 PM
HI,
In when to send part of the notification you have to write a advance script where it will check its RITM and item.
Use this script:
var gr = new GlideRecord('sc_req_item');
gr.addQuery('request',current.sys_id);
gr.addQuery('cat_item','YOUR ITEM SYS ID'); //Item for which you dont want this notification
gr.query();
if(gr.next()){
answer = false;
}else
{
answer = true;
}
THanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 11:44 PM
Hello,
Which notification are you taking about? You will need to notification email Condition script and then query on RITM and then and check for the catalog item and trigger it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 11:53 PM
You can follow these steps to achieve this requirement.
Open your notification and switch to Advanced view and then add the following Script in it.
answer = checkResult();
function checkResult(){
var gr = new GlideRecord('sc_req_item');
ritm.addEncodedQuery('request='+current.sys_id+'^cat_itemIN060f3afa3731300054b6a3549dbe5d3e,060f3afa3731300054b6a3549dbe5d3e'); //Replace with a comma separated list of your catalog item SYS IDs
gr.query ();
if (gr.next())
return false;
else
return true;
}