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
5 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi @AlexandraSz,
can you please elaborate a bit more? This is too vague to understand your goal..
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
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
5 hours ago
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.
Muhammad Iftikhar
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
5 hours ago
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.