- 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
08-19-2016 05:38 AM
The condition, then, should be for example,
if (cuser.u_some_flag == true) ?