Insert link in Notification

Amit104
Kilo Expert

Hello,

I am trying to create a link in the notification that will redirect to the incident in the Service Portal. i tried the following approach 

find_real_file.png

URL on your story is: sp?id=ticket&table=${sys_class_name}&sys_id=${sys_id} and the actual link created on redirection is https://dev53129.service-now.com/sp?id=ticket&table=Incident&sys_id=9c573169c611228700193229fff72400

With sys_class_name I am getting the first letter of the table name as capital (See in bold) and it shows record not found. When i write it in lowercase it is working fine. But how do we create such a link in the notification.

I also tried with the email scripts but with the scripts I am not able to change the link verbiage. For e.g. 'Click here', 'Link', 'your story' or in some case incident number that will redirect to the service portal. For every notification my URL is same but i have to change the verbiage of the link all the time. How do i achieve this?

Please advice.

 

7 REPLIES 7

VigneshMC
Mega Sage

${sys_class_name} prints the value as "Incident", which is causing this issue. Try using mail script to get around this issue.

Yeah but with the mail script i wont be able to change the link verbiage all the time right? For e.g. I want the link on the following verbiage

'Click here', 'Link', 'your story' or in some case incident number that will redirect to the service portal. 

Add the entire line in mail script and use it at appropriate place.

template.print("'Click here" + Link + "your story");