- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 05:50 AM
I am trying to add the link to record in portal, nut it doesnt seem to work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 05:58 AM
Remove the single quote with the red underline. You're ending your string by having that quote there, and https isn't a variable so it needs to be within your quoted string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 05:57 AM
Please use the below code in your email script:
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);
Please mark helpful,if it resolved your issue
-Krupa.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 05:59 AM
wrong portal and relative url based on their example but `gs.getProperty('glide.servlet.uri')` is better than using `'https://' + gs.getProperty('instance_name') + '.service-now.com'` since the latter assumes they're not using a custom URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 05:58 AM
Remove the single quote with the red underline. You're ending your string by having that quote there, and https isn't a variable so it needs to be within your quoted string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 05:58 AM
Hello,
Please use the below link:-
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&view=sp'+'&sys_id=' + current.sys_id + '">${parent.number}</a>';
template.print(url);
Please mark the answer correct/helpful based on impact