- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 12:42 PM
I am writing a script include.
I am trying to add the Address of the user who created the request. How do I add the sys_created_by or sys_id email of the person who created the request?
if(current.getValue('u_drop_off') == '1' {
var dropOff = gs.getProperty('Location');
email.addAddress(dropOff);
email.addAddress(EMAIL OF THE USER WHO CREATED REQUEST);
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 01:34 PM
If you want to send email to the requester, in the User/Group in fields, you can select the field which holds the user value.
If you want to send email with user in CC, you can use script
if(current.getValue('u_drop_off') == '1' {
var dropOff = gs.getProperty('Location');
email.addAddress('cc',dropOff);
email.addAddress('cc',current.requested_for.email);
}
Can you also confirm, your notification is on sc_request table?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 12:47 PM
Hi,
Email can be added as below
email.addAddress("to", EmailAdress, EmailAdressDisplayValue);
email.addAddress("cc", EmailAdress, EmailAdressDisplayValue);
email.addAddress("bcc", EmailAdress, EmailAdressDisplayValue);
Thanks and Regards,
Saurabh Gupta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 12:47 PM
If you are talking about request, you can use current.requested_for.email. You can only add cc,bcc but not in to.
If you want the user to be in to, you can set it from the notification.
//email.addAddress(type, address, displayname);
email.addAddress("cc","john.copy@example.com","John Roberts");
email.addAddress("bcc","john.secret@example.com","John Roberts");
if(current.getValue('u_drop_off') == '1' {
var dropOff = gs.getProperty('Location');
email.addAddress('cc',dropOff);
email.addAddress('cc',current.requested_for.email);
}
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 01:22 PM
I went to the notification to find the field label "Send to event creator" and it is 'send_self'
would it still be email.addAddress('cc',current.requested_for.email);
or email.addAddress('cc',current.send_self.email);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 01:34 PM
If you want to send email to the requester, in the User/Group in fields, you can select the field which holds the user value.
If you want to send email with user in CC, you can use script
if(current.getValue('u_drop_off') == '1' {
var dropOff = gs.getProperty('Location');
email.addAddress('cc',dropOff);
email.addAddress('cc',current.requested_for.email);
}
Can you also confirm, your notification is on sc_request table?
Please mark this response as correct or helpful if it assisted you with your question.