How to set primary email disable by default on preferences for some specific notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 07:27 AM - edited 09-01-2023 06:45 AM
Hi Team,
I have requirement to create email notification for assignment group member once SR task is assigned to them. But it should be allow to subscribed users whenever they needed. OOTB the notification preferences primary email is automatically enables to all the users. and we need to disable it for one particular group notification. This notification should be disable/unsubscribed to all users and they can be enable it through preferences as per their need.
How to set the primary email as disabled by default for one particular notification . Please help me on this to resolve soon. Screenshot has been attached for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 06:25 AM
Thanks for giving your inputs but I need to disable the one notification "ULR_Task_assigned_group" to all the users by default not only for me or my profile that we can do by going notification preferences and disable it. But for all the users we will have to make it disable/unsubscribed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 07:30 AM
Hope you are doing great.
To achieve the requirement of disabling the primary email by default for a specific notification in ServiceNow, you can follow these steps:
open "System Properties" --> glide.notification.email.default.unsubscribe" and set default value of the property to true. This configuration will ensure that the primary email notification is disabled by default for all users.
create a business rule that targets the specific assignment group for which you want to disable the notification.
In the "When to run" section, select the appropriate condition that will trigger the business rule. For example, you can choose to run the business rule whenever a task is assigned to a member of the specified assignment group.
In the "Advanced" section, add the following script to disable the primary email notification for the targeted group:
(function executeRule(current) {
// Check if the assigned user belongs to the specified assignment group
if (current.assignment_group.getDisplayValue() == "Your Assignment Group Name") {
// Disable primary email notification
current.notification = false;
}
})(current);
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 04:40 AM
Hi Riya,
Thanks for update but my requirement is different, do not worried about the assignment groups it should be anything like once catalog task is assigned to any group then the notification would be triggered to all members on that group but the requirement was it will be trigger of those member in the group who have enable/subscribe the notification in preferences.
But the notification under preferences is activated by default so all user will get that group notification. for that case we need to set as disable primary email of that particular notification "ULR_Task_Assignment_Group". That would be all the requirement.
.No need to filters on assignment group it should be anything we need to put the filter on that particular notification which should be disable by default so that the user will enable itself if needed on preferences.