- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2023 06:00 AM
Hello Experts,
I have to put the link in the notification which will redirect the user to the portal view and on the RITM
Here' s what I have written
(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=sc_request&table=' + '&view=sp' + '&sys_id=' + current.sys_id + '">${request_item}</a>';
template.print(url);
})(current, template, email, email_action, event);
User has reported issue as this link is redirecting user to the task portal view not the RITM portal view
Please suggest me where I have made a mistake,
Thank you in advance!
Ujjwala
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2023 06:15 AM
What table is your notification running on? Task or RITM?
If task/sc_task try changing current.sys_id to current.request_item.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2023 06:15 AM
What table is your notification running on? Task or RITM?
If task/sc_task try changing current.sys_id to current.request_item.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2023 07:10 AM - edited ‎01-03-2023 07:10 AM
Hi Mike,
Thank you for replying, It is on the task table, I'll try using this current.request_item.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2023 07:01 AM
Hi @Ujjwala1
Update your href with the below ones as per your requirement
//for portal view
var href = gs.getProperty('instance_name')+".service-now.com/sp?id=ticket&table=sc_req_item&sys_id="+current.sys_id+"&view=sp";
//for platform view
var href = gs.getProperty('instance_name')+".service-now.com/sc_req_item.do?sys_id="+current.sys_id;
Abhit