The CreatorCon Call for Content is officially open! Get started here.

Delegate isn't receiving emails

Allison3
Kilo Guru

I have set up a delegate for myself but the delegate isn't receiving any of the emails I get.

I followed the instructions here: Role Delegation - ServiceNow Wiki

Verified the user is an active user. All 4 options are selected. I am a System Admin and she has an ITIL role. Not sure if this plays into it at all but I didn't find any documentation on it.

 

Any reason as to why she isn't getting the emails or assignments?

1 ACCEPTED SOLUTION

Allison3
Kilo Guru

After opening a ticket in HI, ServiceNow advised this is a known issue in Dublin.



A workaround that you may take is that in the email notification, please go ahead and add the following mail script to the message:



Add this mailscript to the email notification.The script looks up the members of the assignment group, looks at each member's user record to see if they have a delegate active and if that delegate has notifications enabled and then adds the delegate's email address to the "cc" field.


<mail_script>


var grp = new GlideRecord('sys_user_grmember'); 
// lookup the members of the group
grp.addQuery('group',current.assignment_group); 
grp.query(); 
while (grp.next()) { 
// see if the user has a delegate assigned at this time 
   var delegate = new GlideRecord('sys_user_delegate'); 
   delegate.addQuery('user',grp.user); 
   delegate.addQuery('starts','<=',gs.nowNoTZ());
   delegate.addQuery('ends','>=',gs.nowNoTZ()); 
   delegate.query(); 
   while (delegate.next()) { 
// get the email address of the delegate if they have notification enabled
       var usr = new GlideRecord('sys_user'); 
       usr.addQuery('sys_id',delegate.delegate); 
       usr.addQuery('notification','2'); 
       usr.query();
       while (usr.next()) { 
// add the delegate's email to the "cc" list
           email.addAddress("cc", usr.email,usr.name);
       } 
   }
}
</mail_script>


View solution in original post

9 REPLIES 9

randrews
Tera Guru

silly question but does she get other emails?? If you open a record click the mail icon and put in her userid in the to field so it resolves her name... does she get those?


Yep she gets other emails.


i have never set an itil user as my delegate so can't say i have tested that but seems odd that it wouldn't work...



when you look in the sent items in Service First is she listed on the recipients?


The delegate emails don't show in the email logs that they were sent. I have went ahead and submitted a ticket in HI.