
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 06:10 AM
Hello everyone,
I am trying to customize an approval email notification with variables from a requested item. I modified the requested_items_summary_with_options email script with the requested item's sys_id. I then called the mail script in the notification email but the variables show up blank when the manager receives the email.
Here is the notification data I am putting in the body:
Request Type: ${variables.request_type}
Report Title: ${variables.report_title}
Description of Report: ${variables.description_of_report}
Urgency: ${variables.urgency}
Requested Due Date: ${variables.requested_due_date}
${mail_script:approval_items_summary}
${sysapproval.description}
${mailto:mailto.approval}
${mailto:mailto.rejection}
Click here to view ${sysapproval.sys_class_name}: ${sysapproval.URI}
The mail_script approval items are showing up as intended, but the variables from the requested item are not. I tried creating an email template and importing that but I achieved the same results. I attached some screenshots to help provide clarity. Any and all help is greatly appreciated. Thank you for your time!
From,
Chris
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 07:28 AM
Also Can you replace setReqwuestID line with
set.setRequestID(current.getValue('sysapproval'));

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 06:57 AM
In the email script
Please update the line
item.addQuery('request', current.sysapproval)
to
item.addQuery('sys_id', current.sysapproval);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 07:15 AM
Hello dvp,
Thank you for your response. When I updated that line with 'sys_id', it inputs a new line but does not fill in the variables. It now displays:
Summary of Requested items:
RITM0010729: 1 X Informatics Report at $0.00 each
Options:
Requesting User:
Request Type:
Report Title:
Description of Report:
Urgency:
Requested Due Date:
Summary of Requested items:
Click here to approve RITM0010729
Click here to reject RITM0010729
Click here to view Requested Item: LINK
I updated the line with 'sys_id' and the actual sys_id of the requested item. When using the actual sys_id for the requested item, it shows the same 'RITM0010729: 1 X Informatics Report at $0.00 each ' line and also shows the price for each informatics report in a long list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 07:28 AM
Also Can you replace setReqwuestID line with
set.setRequestID(current.getValue('sysapproval'));

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 07:42 AM
Thank you dvp. That did work, but it now shows all the variables for the form. Is there a way for me to specify only certain variables to be shown in the email? Would I specify those in the email script?