how can I set notification/system notification true from code (not ui by clicking)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2025 02:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2025 02:11 AM
Hi @AlexandraSz,
can you please elaborate a bit more? This is too vague to understand your goal..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2025 04:10 AM
as I wroted below:
there's this screen:
and a I want toggle the System notification from code, not from UI because there are too many users who need to configure this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2025 02:13 AM
Hi @AlexandraSz,
You can use this Glide function: setActive(GlideRecord notification, Boolean active)
It sets the user preference for a destination to receive or not receive notifications.
Link: PreferenceDestination - Scoped, Global | ServiceNow Developers
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2025 02:18 AM
I want to sent emails some users, and some of them didn't get email, because their notification is on, but their system notification is off. I don't want to check hundreds of users manually one by one if they have it enabled or not. I want to set it for the users in bulk, preferably from code.