- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2022 01:56 PM
Hi everyone ,
I have This below email script to navigate the Tasks to the Service portal when clicked on email notification. For The Agents who work from the Workspace wants that link to navigate to workspace.
I wrote this script to navigate to HRM to-do summary page. Can any one help how can i make modifications so that it navigates to specific record on agent workspace & If it is IT ticket then should go IT Agent workspace and if it is HR then HR agent workspace.
Thanks.
Here is the script i used
var recordClass = current.sys_class_name;
var sysID = current.sys_id;
var ticketPage = '';
if (recordClass.indexOf('sn_hr_') > -1){
ticketPage = 'hrm_ticket_page';
} else {
ticketPage = 'ticket';
}
var recordURL = "/sr?id=" + ticketPage + "&table=" + recordClass + "&sys_id=" + sysID;
template.print('<strong><font size="3" color="#000000" face="helvetica"><a href="' + recordURL + '">' + current.getValue("number") + '</a></font></strong>\n');
})(current, template, email, email_action, event);
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2022 08:31 PM
Hi,
You can update URL line like below:
var recordURL = "/sr?id=" + ticketPage + "&table=" + recordClass + "&sys_id=" + sysID;
var recordClass = current.sys_class_name;
var sysID = current.sys_id;
// cooment below 6 lines if not required
var ticketPage = '';
if (recordClass.indexOf('sn_hr_') > -1){
ticketPage = 'hrm_ticket_page';
} else {
ticketPage = 'ticket';
}
var recordURL = "/now/workspace/agent/record/" + recordClass + "/" + sysID; // update this line only
template.print('<strong><font size="3" color="#000000" face="helvetica"><a href="' + recordURL + '">' + current.getValue("number") + '</a></font></strong>\n');
Thanks
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2022 06:40 AM
I will try this . Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 01:19 PM
I just created an idea for this same issue. There really should be an OOTB way to do this. If you want to vote up: Notification links for Agent Workspace