How to include related list table field in email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2022 01:48 AM
I am working on email notification.I have a requirement to include a fields which is in related list table.
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2022 01:54 AM
Hi,
You have to GlideRecord the related list table in email scripts, add/prints the required columns/fields.
Call email script in email notifications.
Take a reference of old the read - Related list records in notification
and Scripting for email notifications
Feel free to mark it as helpful and correct!
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 09:45 PM
Create mail scripts in System Policy > Email > Notification Email Script->
(function runMailScript(current, template, email, email_action, event) {
var item = new GlideRecord("sc_req_item");
item.addQuery("request", current.sys_id);
item.query();
while(item.next()) {
var catalogItem = item.number + ': ' + item.cat_item.getDisplayValue();
var misc = item.variable_pool.alt_poc;
template.print(catalogItem + "<br/> Field: " + misc);
}
})(current, template, email, email_action, event);
Now you can call the above mail script in email notification as ${mail_script:script name}