- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 02:33 PM
Hi Team,
how to print approver name in email notification using dot walking.
My notification is created on RITM(sc_req_item) table, here i want print requested for approver using dot walking.
do we have any other alternative?
Thanks in advance......
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 03:29 PM
Use below script inside a mail script.
<mail_script>
var approvers = '';
var app = new GlideRecord('sysapproval_approver');
app.addQuery('sysapproval',current.sys_id);
app.query();
while (app.next())
{
if (approvers!='')
approvers = approvers + ','+app.approvers.getDisplayValue();
else
approvers = app.approvers.getDisplayValue();
}
email.setSubject('You request is pending for approval with '+approvers);
</mail_script>
Check below link. It has everything you want on how to configure your 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
01-11-2018 02:51 PM
You can't use dot walk because requested item to approval table is 1 to many relation.
Query the approval table using script and then print it in the email.
var approvers = '';
var app = new GlideRecord('sysapproval_approver');
app.addQuery('sysapproval',current.sys_id);
app.query();
while (app.next())
{
if (approvers!='')
approvers = approvers + ','+app.approvers.getDisplayValue();
else
approvers = app.approvers.getDisplayValue();
}
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
01-11-2018 03:18 PM
Hi Snajiv,
Thank you, can you help me with email script.
and i want print approver name in subject, any idea on this?
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 03:29 PM
Use below script inside a mail script.
<mail_script>
var approvers = '';
var app = new GlideRecord('sysapproval_approver');
app.addQuery('sysapproval',current.sys_id);
app.query();
while (app.next())
{
if (approvers!='')
approvers = approvers + ','+app.approvers.getDisplayValue();
else
approvers = app.approvers.getDisplayValue();
}
email.setSubject('You request is pending for approval with '+approvers);
</mail_script>
Check below link. It has everything you want on how to configure your email
Please mark this response as correct or helpful if it assisted you with your question.