- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020 02:59 AM
Hello,
Need to get approver name in notification.
ex - when change request is going to approval, i need approver name in HTML template.
Can anyone please help me with this.
Regards,
Nivedita
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 05:12 AM
Hi Nivedita,
Replace approv.query(); with below in your code once.
approv.addQuery('state','approved');
approv.orderByDesc('sys_upated_on');
approv.query();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 03:23 AM
I is not calling that email script.
It is printing log statement.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 01:49 PM
Hi,
Is this notification triggered based on event?
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 12:14 AM
Hello Jaspal,
Thank you for your reply.
I tried this but it is not working.
I want to get approver name who has approved change request.
Can you please help me with this.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020 03:11 AM
Hi Nivedita,
Try the below code in the message of the notification. Update the conditions based on your instance configuration and system setup.
<mail_script>
var appRec = new GlideRecord('sysapproval_approver');
appRec.addQuery('state', 'approved');// if approved is not working put the correct value of the approver state field
appRec.addQuery('document_id',current.sys_id);
appRec.query();
while (appRec.next()) {
template.print("<ul><li>Approved By: " +appRec.approver.name+"</li></ul>");
}
</mail_script>
Mark it as helpful if it works.
For More Information check this link: https://community.servicenow.com/community?id=community_question&sys_id=e9374b29db1cdbc01dcaf3231f96...
Regards,
Pavan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 04:51 AM
Hi,
Can anyone please help me with this?
Regards,
Nivedita