Incident number as link

Sharath807
Tera Contributor

Hi all, How can i get this current.number (incident number) as http link in output.

Screenshot (198)_LI.jpg

8 REPLIES 8

Sharath807
Tera Contributor

@KB18 var Number = current.number;
var URL = gs.getProperty('glide.servlet.uri') + 'incident.do?sys_id=' + current.sys_id;
r.setStringParameterNoEscape('u_text', 'New incident assigned to you. Click <a href="' + URL + '">' + Number + '</a> to view the incident.');

tried this still not working

@Sharath807 Update your code as follows and let me know if it works for you.

 

var incNumber = current.number;
var emailURL = gs.getProperty('glide.servlet.uri') + 'incident.do?sys_id=' + current.sys_id;
r.setStringParameterNoEscape('u_text', 'New incident assigned to you. Click <a href="' + emailURL + '">' + incNumber + '</a> to view the incident.');

 

Variable names Number and URL are reserve keywords in javascript and can't be used as variable names.

@Sandeep Rajput Hi tried above script..still its not working

Abhishek Dighe
Tera Contributor

Use ${URL_REF}