Deactivate ITSM OOTB emails

Gaurav_S0107
Tera Contributor

Hi, I am new to SN, my requirement is to deactivate(set = false) to all OOB ITSM email notifications.

I am trying through fix script on notifications table: 

 

var gr = new GlideRecord('sysevent_email_action');
gr.addQuery("active", true);
gr.addQuery("category" , "IT Service Management");
gr.query();
while (gr.next() ) {
gs.info(gr.next());
gr.active = false;
gr.update();
}
 
But after running the script only few notifications are setting to "Active" as false. Don't know why.
Can anyone help what is wrong in it ?
I want to make all notifications deactivate(as false), whose category is "IT Service Management" and Active is True.
 
Thanks in Advance. 
1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

You can do via list view mate.

 

AGLearnNGrow_0-1712920145432.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************