How to suppress notification during bulk upload

Sriram28
Tera Contributor

Hello Team,

 

While uploading or bulk ingestion of incident records.

 

How we can suppress any notifications to users and assignment groups.

 

Please suggest.

 

Thanks in advance.

2 REPLIES 2

Danish Bhairag2
Tera Sage

Hi @Sriram28 ,

 

It usually depends on the approach of how the records are being uploaded/inserted.

  1. If its via transform map then you can uncheck the run business rule check box & then load the data.
  2. If its via script then u can add setWorkflow(false) before ur gr.insert to stop the BRs from executing
  3. Turn OFF the BR's which are being triggered at the time of Upload/insert, then reactivate it. (Not the recommended way)

Please test this once in lower environment before doing it in Production.

 

Thanks,

Danish

Tanushree Maiti
Tera Patron

Hi @Sriram28 

 

If you are using a server-side script or REST API to insert records, you can bypass the notification engine entirely by preventing business rules from running.

  • Use setWorkflow(false) immediately before the insert() or update() command.

 

 

Sample :

 

var grInc = new GlideRecord('incident');

grInc.initialize();

grInc.short_description = "Bulk Uploaded Incident";

grInc.assignment_group = "<sys_id_of_group>";

grInc.setWorkflow(false); // Suppresses Business Rules & Notifications

grInc.insert();

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti