The CreatorCon Call for Content is officially open! Get started here.

Insert and Update Notifications getting triggered during insert of a Record.

devendranarun
Tera Guru

I have created 2 Notifications (Insert and Update). When i create a new record, the insert notification gets triggered due to insert check but Update notification also gets triggered along with this. What can be the issue? Any help is highly appreciated.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Deven,

So since you have 2 notifications one for insert and one for update check whether for insert notification insert flag is true and for update notification update flag is true. At one point of time only 1 flag either insert/update should be true for both the notifications

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

9 REPLIES 9

@devendranarun 

Hope you are doing good.

Did my reply answer your question?

Would you mind marking the best matching answer as correct and helpful, to close this thread?

Regards
Ankur

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

Hi Ankur,

I have tried everything, but this notification is not triggering on insert.  Notification is OOTB Incident Resolved.

 

Original Post is  OOTB Notification not triggering on Insert - ServiceNow Community

 

Capture.PNG

devendranarun
Tera Guru

Hi Ankur,

I have checked on insert for the first notification and checked on update for the second notification.

Hi Devendra,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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

Srinivas G1
Tera Contributor

Please Use the following script :

 

if(current.operation()=="insert")

{

// insert email notification

       gs.eventQueue("event name",current,gs.getUserID(),gs.getUserName());

 

}

else

{

// Update email notification

       gs.eventQueue("event name",current,gs.getUserID(),gs.getUserName());

}