
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2022 07:39 AM
Hi all,
I have a mail script for a mail notification where the event.parm1 refers to the sys_id of the user. Now I would like to use that data to add the *manager's* email address to CC.
What I did so far:
var gr = new GlideRecord('sys_user');
gr.get(event.parm1);
var mngr_email = gr.manager.email;
email.addAddress("cc", mngr_email, mngr);
What am I doing wrong?
Thanks and kind regards,
Cheski
Solved! Go to Solution.
- Labels:
-
Cost Management (ITSM)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2022 07:46 AM
Hey,
var gr = new GlideRecord('sys_user');
if(gr.get(event.parm1)){
email.addAddress("cc", gr.manager.email.toString(), gr.getDisplayValue("manager"));
}
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2022 10:02 AM
Thanks, this one worked 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2022 11:00 AM
Awesome!
Aman Kumar