- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 12:09 AM
Folks,
i am a having a Quick message where i am trying to populate from text as : logged user email id
email script :
this email script when i run in background script its giving email id but nt in quick message and notification
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 01:02 AM
@Aarushi1991 - Please refer the screenshot below for the result after using ${current_user.email} in quick message
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 12:30 AM - edited 03-28-2025 12:31 AM
@Aarushi1991 - issue with your mail script ttemplate.print(email);
Please replace with right variable "emailid". It should be template.print(emailid);
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 12:40 AM
update as this
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var user= gs.getUserID();
var usertable= new GlideRecord("sys_user");
if(usertable.get(user)){
var emailid = usertable.email.toString();
template.print(email);
}
})(current, template, email, email_action, event);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 12:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 12:59 AM