How do you disable an email notification on the sc_request table based off them RITM item?

Scott29
Kilo Sage

I am trying to disable the "Request Completed" notification based on the item selected on the related RITM if the item on the RITM is Offboarding.

 

There would only be 1 RITM related to the sc_request. 

Scott29_0-1748924216572.png

Is there a way to do it from Conditions, or would it have to be scripted? If it has to be scripted, what would the client script look like?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Scott29 

if your notification is on sc_request table then you can use advanced notification condition with script

var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.getUniqueValue());
gr.addQuery('cat_item.name', '!=', 'Your Item Name Here'); // give your catalog item name
gr.query();
answer = gr.hasNext();

Something like this here

AnkurBawiskar_0-1748925502142.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Ganeshm1
Tera Guru

Hi,

Add one more condition in the like item is not off boarding. So that it will not trigger the notification. 

Unfortunately item isn't visible on the sc_request level.

Ankur Bawiskar
Tera Patron
Tera Patron

@Scott29 

if your notification is on sc_request table then you can use advanced notification condition with script

var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.getUniqueValue());
gr.addQuery('cat_item.name', '!=', 'Your Item Name Here'); // give your catalog item name
gr.query();
answer = gr.hasNext();

Something like this here

AnkurBawiskar_0-1748925502142.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader