Redirecting email notifications to Service portal approvals and surveys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2018 05:30 PM
Hi Every One,
We have requirements to redirect approval notification and Survey notification to service portal.
I have created email script :
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=approval&&table=' + current.sys_class_name + '&sys_id=' + current.sys_id + '">Link</a>';
template.print(url);
})(current, template, email, email_action, event);
Added in notification:
Click here to view Approval Request: ${mail_script:Approval_notification}
when user clicks on link it is redirecting to Service portal by says "Record Not found". Same case with Surveys to.PFA
Can any one suggestion me what peace i am missing in redirecting for specific record to get opened for Approvals & Surveys.
Thanks in Advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2018 05:42 PM
You have to hard code table name to table=sysapproval_approver
${sys_class_name} it will not return the class name of the record for approval. Mostly it works on like INC,REQ,RITM,etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2018 08:11 AM
Hi ,
Please replace your code with the below code
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=approval&&table=sysapproval_approver'+ '&sys_id=' + current.sys_id + '">Link</a>';
template.print(url);
})(current, template, email, email_action, event);
Added in notification:
Click here to view Approval Request: ${mail_script:Approval_notification}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2018 11:00 AM
how to redirect in case of survey?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2025 05:58 AM - edited ‎03-07-2025 06:01 AM