Question On Notification

Community Alums
Not applicable

Hi There,

I have one Requirement on Email Notification, 

 

When the New Request is created at that time Requestor will receive one Out of the box Email, that is Request is opened on Your Behalf, 

 

But Now in my case, for Termination Order Guide  I need to add Some Other recipients in who will receive section. 

When The Termination Request will Rise at that time One custom Notification should send and The Out of the box Notification, should not send(OOB Email should restrict).


But in my case, when i rise Termination Request at that time Custom Notification is Also triggering and The OOB is also triggering, but i don't want OOB Notification here,

 

For that i have set the below condition to restrict the OOB Notification, but which is not working.

 

PriyaSm_0-1701773915753.png

 

 

Can anyone please help me, how can i restrict this OOB Email for Only Termination.

 

Thanks,

Priya

19 REPLIES 19

@Community Alums 

 

I have created the same scenario in my PDI and one notification is getting triggered only

Do one thing can you remove the conditions from your custom notification for sometime and try again

 

Do you want that custom notification triggered for the specific item ?

Community Alums
Not applicable

@Prince Arora ,

 

When the Request is created for Termination Item at that time, Custom Notification should trigger, when The Request is for Other Items except Termination at that time OOB Notification should trigger.

@Community Alums 

 

Add this in your custom notification & remove other conditions:

answer= false;
var
gr = new GlideRecord("sc_req_item");
gr.addQuery("request",current.sys_id);
gr.addQuery("cat_item","04b7e94b4f7b4200086eeed18110c7fd");
gr.query();
if(gr.next()){
answer = true;
}

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

Community Alums
Not applicable

@Prince Arora ,

 

When use the Above code at that time,

If i Raise the Termination Request at that time, Custom Notification Triggering and OOB Notification is Not Triggering which is Correct.

But If i Raise Other Request, except Termination at that time OOB Notification is not Triggering (OOB Notification should trigger her), which is not working.

 

Thanks,

Priya

@Community Alums 

 

Great to see you issue resolved now!

 

Please update the OOB Notification script as below:

 

answer = true; // add only this
var
gr = new GlideRecord("sc_req_item");
gr.addQuery("request",current.sys_id);
gr.addQuery("cat_item","04b7e94b4f7b4200086eeed18110c7fd");
gr.query();
if(gr.next()){
gs.info("here");
answer = false;
}

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.