- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014 02:40 AM
Can we remove a particular recipient from Email Notification being sent. This Notification is sent to glide field recipients.
Any suggestions will be helpful. Thanks!!
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014 03:55 AM
this is what I did recently in a before insert business rule on sys_email -
var usermails = current.recipients.split(",");
var usermails1 = current.recipients.split(",");
for(var i=0;i<usermails.length;i++){
var gr = new GlideRecord('sys_user');
gr.addQuery('email',usermails[i]);
gr.query();
if(gr.next())
{
var cuser = gs.getUser();
cuser = cuser.getUserByID(gr.user_name);
if (your conditon to remove the recipient)
{
usermails1.splice(i, 1);
}
}
}
current.recipients = usermails1.toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014 03:55 AM
this is what I did recently in a before insert business rule on sys_email -
var usermails = current.recipients.split(",");
var usermails1 = current.recipients.split(",");
for(var i=0;i<usermails.length;i++){
var gr = new GlideRecord('sys_user');
gr.addQuery('email',usermails[i]);
gr.query();
if(gr.next())
{
var cuser = gs.getUser();
cuser = cuser.getUserByID(gr.user_name);
if (your conditon to remove the recipient)
{
usermails1.splice(i, 1);
}
}
}
current.recipients = usermails1.toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014 06:43 AM
Thank you Kumar. I hope your solution works for me.
Cheers!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014 05:35 AM
You can remove this notification from the users profile by impersonating that user and switching off the notification from their profile. To do this, impersonate the user, then click My Profile > Notification Preferences. Find the notification name from this list and click Off to disable it for that user. NOTE that this will only be visible if the user has already received a notification of this type. If they haven't there's another way to do it.
Type "cmn_notif_message.do" on to the left-hand navigation pane. You will need to then personalize the form and add the "Send Email" and "User" fields. When that is done, enter the name of the notification into the Notification Message field, enter the users name into the User field. Uncheck the Send Email field then save. That user will no longer receive mails of that type.
If you want to do this for a mass of users, you can do it via a background script. Let me know if you need help with that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014 06:48 AM
Thanks Adam for your response. But my requirement was not to restrict a user completely from receiving notifications. I only required to restrict user in a particular Email Notification when a condition is satisfied.