- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2018 09:50 AM
When an Incident is resolved, the user gets the email below. But the “Take me to the incident” link takes you to the actual incident form. I would have thought that if you were an ESS guy with no roles, it would take you to the portal view rather than the “backend” view. Is this the case? If not, is there a way I can have ESS users , from the email link, go directly to the Incident in the Service Portal, and users with roles go to the Incident form in the normal view (ITIL view?)
Appreciate any response,
Thanks, Mark S.
Solved! Go to Solution.
- Labels:
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2018 11:19 AM
Here is the Incident Resolved OOB notification.
The mail script I need to refer to is called ‘${mail_script:incident_take_me_to_the_incident}’
I found this article.
I replaced the second line in the original mail script - var link = current.getLink();
with var link = '/sp/?id=ticket&table=incident&sys_id=' + current.sys_id + '&sysparm_view=portal';
This seems to work for me. Can anyone spot anything wrong with this?
Many thanks to all respondents, I hope this is useful to someone else.
This is the original mail script:
------------------------------------------------------------------------------------------------------------------------------------------------
(function runMailScript(current, template, email, email_action, event) {
var link = current.getLink();
if (email_action.name != "Incident Resolved") {
template.print('<p><font size="3" color="#808080" face="helvetica">');
template.print(gs.getMessage('You can view all the details of the incident by following the link below:'));
template.print('</font></p>');
}
else {
template.print('<p><font size="3" color="#808080" face="helvetica">');
template.print(gs.getMessage('If you feel the issue is not resolved, please click the following link and reopen your incident:'));
template.print('</font></p>');
}
template.print('<font face="helvetica">');
var backgroundColor = 'background-color: #278efc;';
var border = 'border: 1px solid #0368d4;';
var color = 'color: #ffffff;';
var fontSize = 'font-size: 16px;';
var fontFamily = 'font-family: Helvetica, Arial, sans-serif;';
var textDecoration = 'text-decoration: none; border-radius: 3px;';
var webKitBorder = '-webkit-border-radius: 3px;';
var mozBorder = '-moz-border-radius: 3px;';
var display = 'display: inline-block;';
var padding = 'padding: 5px;';
if (email_action.name == "Incident Survey") {
color = 'color: #343d47;';
backgroundColor = 'background-color: #e6e8ea;';
border = 'border: 1px solid #bdc0c4;';
}
template.print('<a href="' + link + '"');
template.print('style="' + backgroundColor + border + color + fontSize + fontFamily + textDecoration + webKitBorder + mozBorder + display + padding);
template.print('">');
template.print(gs.getMessage('Take me to the Incident'));
template.print('</a>');
template.print('</font>');
template.print('<br><br>');
template.print('<p><font size="3" color="#808080" face="helvetica">');
template.print('Thank you.');
template.print('</font></p>');
})(current, template, email, email_action, event);
-----------------------------------------------------------------------------------------------------------------------------------------

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2018 09:54 AM
modify email script that is used for take me to the incident. Share screenshot I can help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2018 10:08 AM
Hi,
You can write email script:
var incurl = gs.getProperty('glide.servlet.uri')+"portal_ess?id=portal_form&table=incident&view=ess&sys_id="+current.sys_id;
var inclink = '<a href="'+incurl+'">Self Service Portal</a>';
template.print(inclink);
Thanks
Shashikant
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2018 10:14 AM
Adding to the other replies, you need to navigate to the 'Notification Email Scripts' and edit the link in the 'incident_take_me_to_the_incident' mail script. It currently fetches the instance view of the record with the 'getLink()' function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2018 11:19 AM
Here is the Incident Resolved OOB notification.
The mail script I need to refer to is called ‘${mail_script:incident_take_me_to_the_incident}’
I found this article.
I replaced the second line in the original mail script - var link = current.getLink();
with var link = '/sp/?id=ticket&table=incident&sys_id=' + current.sys_id + '&sysparm_view=portal';
This seems to work for me. Can anyone spot anything wrong with this?
Many thanks to all respondents, I hope this is useful to someone else.
This is the original mail script:
------------------------------------------------------------------------------------------------------------------------------------------------
(function runMailScript(current, template, email, email_action, event) {
var link = current.getLink();
if (email_action.name != "Incident Resolved") {
template.print('<p><font size="3" color="#808080" face="helvetica">');
template.print(gs.getMessage('You can view all the details of the incident by following the link below:'));
template.print('</font></p>');
}
else {
template.print('<p><font size="3" color="#808080" face="helvetica">');
template.print(gs.getMessage('If you feel the issue is not resolved, please click the following link and reopen your incident:'));
template.print('</font></p>');
}
template.print('<font face="helvetica">');
var backgroundColor = 'background-color: #278efc;';
var border = 'border: 1px solid #0368d4;';
var color = 'color: #ffffff;';
var fontSize = 'font-size: 16px;';
var fontFamily = 'font-family: Helvetica, Arial, sans-serif;';
var textDecoration = 'text-decoration: none; border-radius: 3px;';
var webKitBorder = '-webkit-border-radius: 3px;';
var mozBorder = '-moz-border-radius: 3px;';
var display = 'display: inline-block;';
var padding = 'padding: 5px;';
if (email_action.name == "Incident Survey") {
color = 'color: #343d47;';
backgroundColor = 'background-color: #e6e8ea;';
border = 'border: 1px solid #bdc0c4;';
}
template.print('<a href="' + link + '"');
template.print('style="' + backgroundColor + border + color + fontSize + fontFamily + textDecoration + webKitBorder + mozBorder + display + padding);
template.print('">');
template.print(gs.getMessage('Take me to the Incident'));
template.print('</a>');
template.print('</font>');
template.print('<br><br>');
template.print('<p><font size="3" color="#808080" face="helvetica">');
template.print('Thank you.');
template.print('</font></p>');
})(current, template, email, email_action, event);
-----------------------------------------------------------------------------------------------------------------------------------------