How to stop notifications when bulk of requests are closed at a time?

Samyukta1
Tera Expert

Hi,

 

I have around 2000 requests which are in open state .. now I want to close them.

I can achieve this with scheduled Job but at the same time I want to stop the notifications for all those 2000 requests so that end users may not be in panic as thousands of emails might trigger at a time. How to stop the notifications ?

4 REPLIES 4

Omkar Kumbhar
Mega Sage
Mega Sage

Hello @Samyukta1 ,

Please check the below link which will help you.

https://www.servicenow.com/community/developer-forum/stop-triggering-email-via-fix-script/m-p/166274...

 

Thanks,

Omkar

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

Basheer
Mega Sage

Hi @Samyukta1 ,

You can use .setWorkflow(false); in your scripts.

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

Hi @Basheer ,

 

It is stopping only the notification which are triggered by an event.... I mean Business Rule. but there are few which are getting triggered directly based on filter condition. How Can I stop them?

Hi @Samyukta1 ,

As a work around I would suggest this.

Figure out what is the time at which there would be least number of users logged in and there is very minimal activity on the request items in the system (probably 1 am to 4 am).

 

Disable to notification(active false) for 2 mins and trigger background script/whichever scripts you want to run.

 

Do it in batches of 100 requests at a time so that there won't be much load.

 

Identify if there is any mail communication which was missed in those 2 minutes where we inactivated our notification.

 

Do it like for 10 10 10 mins inactivating the notification for 2 minutes.

This way there is no chance of triggering the notification and there would be very minimal emails which should have been triggered but not trigered which can be easily rectified

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.