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

Ahmmed Ali
Mega Sage

You can set notification field on user table to disabled for all users.

 

Users can go to ServiceNow and enable notification as below.

find_real_file.png

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Hi Ahmed

 

I did that through script but some how itz getting enabled again 😞

Hi Taqdeer,

 

Thats weird, OOTB it does not update automatically. 

it is updating to enabled as soon as you update it as disabled?

try to update one user record from form/list view. if it is rolling back to previous value immediately, look at any business rule which is updating the field.

 

Aslo can you post the script you used here?

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Do you mean something like below, though default - scripted - off for all users?

find_real_file.png

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