- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 05:43 AM
Need to get the requested item & catalog item name in notification body & subject. This notification is taken on request table.
help me the way to fulfill this.
Thank you.
Solved! Go to Solution.
- Labels:
-
Request Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 05:48 AM
Hi,
Since notification is on request table you need a mail script. Try something as below.
System Notification >> Email >> Notification Mail script.
Create New: getritmdetails
with script as below
(function runMailScript(current, template, email, email_action, event) {
var getritm = new GlideRecord('sc_req_item');
getritm.addQuery('request', current.sys_id);
getritm.query();
if (getritm.next()) {
template.print('Requested Item: ' + getritm.number);
template.print('Catalog Item: ' + getritm.cat_item.getDisplayValue());
}
})(current, template, email, email_action, event);
Call mail script in notification body field as below
${mail_script:getritmdetails}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 07:16 AM
Hi
Thanks for the reply. It is helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 05:51 AM
Hi
Requested Item ${sysapproval} Approval Request for ${sysapproval.cat_item.name}
Item is the display value, cat_item is the name of the field. I think it should work.
Also,
Subject after preview:
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep