Firing a notification using a background script.

Emily7
Kilo Explorer

Hi SN developers!

I am trying to fire a notification when a priority 1 incident occurs. Here is the screen shots.

find_real_file.png
It works correctly when I create a new priority 1 incident or update the incident priority using "Update" button.

However, when I create a backgroud script and update the priority to 1 but the notification doesn't fire. Is there any advice? Thank you in advance.

find_real_file.png

find_real_file.png

find_real_file.png

 

 

find_real_file.png

1 ACCEPTED SOLUTION

Phuong Nguyen
Kilo Guru

Hi Emily,

In your background script, you have gr.setWorkflow(false); this prevents business rules and workflows from running, hence your business rule does not fire the event.

 

Regards,

Phuong

If you find my suggestions helpful, please mark it as correct or helpful to help out others as well 🙂 

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

since your script has setWorkflow(false) it is stopping email from being sent;

can you try to remove that and check once

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

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