How to set notifications turn off by default

taqdeer
Tera Contributor

Hi All,

I want to turn off the notifications to all the users by default in servicenow. Users can turn it on later if they need.

Could anyone please help me with this.

Please note that I can't turn off the notification engine.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@taqdeer 

sys_user table has notification field with enable or disable option

You can write background script to disable that for all users if the above approaches don't work

disableNotifications();

function disableNotifications(){

var rec = new GlideRecord('sys_user');
rec.query();
rec.setValue('notification', 1);
rec.updateMultiple();

}

Regards
Ankur

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

View solution in original post

8 REPLIES 8

Hi Mark, 

Yes it is. I turned off by scripting but some how itz getting enabled again 😞

Can you share what you've setup?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Ankur Bawiskar
Tera Patron
Tera Patron

@taqdeer 

sys_user table has notification field with enable or disable option

You can write background script to disable that for all users if the above approaches don't work

disableNotifications();

function disableNotifications(){

var rec = new GlideRecord('sys_user');
rec.query();
rec.setValue('notification', 1);
rec.updateMultiple();

}

Regards
Ankur

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

@taqdeer 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

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