How to set up email notifications to point to the Service Portal


Out of Box email notifications is set up to direct users to records on the Platform UI. In some cases, you might want to have users go to the record on the Service Portal instead.


1) Use an email notification script which would look something like the below:

(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=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id + '">Link</a>';


})(current, template, email, email_action, event);


2) Once you have created the email script, you can then reference this in the email notification templates by using ${mail_script:name_of_email_notification_script}. Once you include this, it will show a "Link" hyperlink which will take you to the record on the SP.

Applicable Versions

All Supported

Additional Information

Article Information

Last Updated:2019-05-21 11:40:59