how to stop sending mails to particular users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 06:07 AM
Hi All,
we are in process of closing old tickets which is 3 years old ,when we close those incidents ,there will be mail sent to user ,can we stop these mails reaching user any way supress them ,and it is should not effect current business notifications...
Regards
Govardhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 06:46 AM
I would recommend closing out the old tickets via script. You can create a fix script that closes the incidents but before your update() statement, use setWorkflow(false) and this will prevent business rules, workflows, and notifications from going out:
http://wiki.servicenow.com/index.php?title=GlideRecord#setWorkflow
Now this said if there is auditing, metrics, slas, etc that you also want to "close out", then using setWorkflow() won't correct those.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 07:49 AM
Hi Micheal,
Are you sure that setWorkFlow prevents notification from going out ?
In the wiki it's written "Enables or disables the running of business rules that might normally be triggered " but there is not nothing about notifications.
Thanks you in advance
Best regards,
Hamza
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 09:00 AM
Hamza, setWorkflow() stops all background processes from running. I would say that "disables the running of business rules" includes the notification engine, workflows, etc. I would suggest testing this in a test instance before attempting it in production just to be sure your script runs as you want it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 09:14 AM
Thank you Micheal, that's what I am going to do
Have a good day
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 09:18 AM
I would not disable the notifications, you'll lose all notifications you do want during this time. What I would do is go to the notification(s) in question and put a condition on them...something along the lines of 'opened is less than 1 year from today'. This will prevent any notifications that are over a year old from sending for that notification.