Get the user email
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 08:04 AM
Hi, I'm working in the script include to get the users email. Currently it is not getting the users email and would like some help.
Here's the script below:
var leadUser = vtmrGR.u_user_ref;
var leadGR = new GlideRecord('sys_user');
if(leadGR.get(leadUser)){
var leadEmail = leadGR.email;
email.addAddress("cc", leadEmail);
}
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 09:58 AM
There isn't anything wrong with the script as long as you already have the object vtmrGR defined and u_user_ref returns a sys_id of the user.
Did you check on the sys_email table that the email of the user was included? When you cc the email address, that will be displayed on the "Copied" field of the sys_email record and not on the "Recipients" field.