- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 09:26 PM
Hello All,
I have a problem with approving/rejecting a Approval request using email notification.
When the 1st approver click the hyperlink "Click here to Approve/Reject", it will open and redirected to the approval form.
when the 2nd and 3rd approver click the same link, it will open and redirected to the approval form but under the 1st approver view or name.
Please help to check and correct my existing email script:
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var baseURL = '';
baseURL = "https://" + gs.getProperty('instance_name') + ".service-now.com/sysapproval_approver.do?sys_id=" + current.sys_id;
template.print('<a style="font-family: verdana; font-size: 14px;color: blue;" href=' + baseURL + '>Click here to Approve/Reject</a><br />');
})(current, template, email, email_action, event);
The link should be open and redirected under for each approver not only under the 1st approver.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 11:26 PM
your approval email notification should be on sysapproval_approver so that it sends 3 different emails for each of those 3 approver users
Condition: current.source_table == 'pm_project_task'
you can access the task fields using dot walking and show in email body
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 09:39 PM
@Al-jhon I think the approval request for "Dan Kuo" is sent to all 3 approvers. The email should be sent to only "Dan Kuo". The 2nd and 3rd approvers should get different emails.
So please check the notification and send it to the approver only. In this way the 2nd and 3rd approvers will get there own emails and when they click on link they will be redirected to there own approval request page.
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 10:55 PM
Hello @jaheerhattiwale ,
for further information, my email notification table is Project Task:
and it will be sent to the approver who set by a user:
and it will show on the Related list Approver:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 11:05 PM
@Al-jhon Ok got it. Try updating the script as below and check.
ServiceNow Community Rising Star, Class of 2023

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 11:17 PM
hi @Al-jhon,
Trigger the approval from sysapproval_approver table when record is created for specific document_id.
This way you can send separate emails to each approvers. For each users specific approval record present so single link will not work in this case. If you still wish to use the single email, you can show the list view of the record using below URL:
baseURL = "https://" + gs.getProperty('instance_name') + ".service-now.com/sysapproval_approver_list.do?sysparm_query=approverDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5Edocument_id%3D" + current.sys_id;
Or else you can use the email template in your email and create and inbound email action or inbound flow trigger to approve the same once approvers send the approval email.
Let me know if it helped.
Thanks
Nootan