Link in the Email should redirect ITIL user to native UI page and non itil users to Service Portal
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2026 05:08 AM
Link in the Email should redirect ITIL user to native UI page and non itil users to Service Portal
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2026 05:12 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2026 05:22 AM
the code in that post is not working for me, maybe the exact code might help
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2026 06:06 AM
what script did you try and what debugging you did?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2026 09:27 AM
(function runMailScript(current, template, email, email_action, event) {
if (gs.getUserByID().hasRole('itil')) {
template.print('Link: <a href="https://' + gs.getProperty('glide.servlet.uri') + '.service-now.com/incident.do?sys_id=' + gr.sys_id + '&sysparm_stack=incident_list.do?sysparm_query=active=true">click here</a>');
} else {
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id + '">Link</a>';
template.print(url);
}
})(current, template, email, email_action, event);