Notifications URI_REF are not redirecting to Service Portal.

crhistopherjuar
Kilo Expert

Hi Experts!,

I am having problems with the ${URI_REF} Notifications OotB to redirect to the Service Portal.

Is there a way to change the ${URI_REF}   OotB to redirect the Request Notifications to the Service Portal.

Appreciate your quick response.  

4 REPLIES 4

oharel
Kilo Sage

I think you will have to add a link using an email script:


For incident:


https://<INSTANCE NAME>/sp?sys_id=<ticket sys id>&view=sp&id=ticket&table=incident


For service request:


https://<INSTANCE NAME>/sp?id=sc_request&table=sc_request&sys_id=<ticket sys id>



I took that from my personal dev instance.


harel


ndt13
Giga Expert

In the email notification, you can replace "${URI_REF}" with "<a href="sp?sys_id=${incident.sys_id}&view=sp&id=form&table=incident">${number}</a>"


ddiroma
Mega Expert

Christopher,


Hopefully you were able to resolve your issue by now. The two replies on here should have definitely pointed in the right direction. I created a mail script called sp_incident_link and called the mail script in the notification by using ${mail_script:sp_incident_link}. The mail script was as follows - this is only the part in the //add your code here section


      // variable html is a link that has the instance property + the ticket form link that points to the incident table with the current sys id and is shown as the Incident number


  var html = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=incident&sys_id=' + current.sys_id + '">' + current.number + '</a>';


//print the html variable


  template.print (html);


manishm
Mega Guru

This one has a good solution :

https://community.servicenow.com/community?id=community_question&sys_id=fb948fa9dbd8dbc01dcaf3231f961935