- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 06:09 AM
Hi All, I am writing an email script so as to get Request number as a hyperlink in the notification. But I am getting current.number instead. It is taking me to correct record so means that the hyperlink is correct but I want it to show Request number i.e. REQ123456 not current.number.
Also, I am not sure why task has quote in front of it? output given below.
var id = current.sys_id;
var sLink = "task.do?sys_id="+id;
template.print("<a href='"+sLink+"'>current.number</a>);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 06:12 AM
template.print("<a href='"+sLink+"'>" + current.number + "</a>");
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 06:12 AM
template.print("<a href='"+sLink+"'>" + current.number + "</a>");
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 06:20 AM
Also, can you please confirm why there is quotation in front of task? Is it a way to make it a link?
var sLink = "task.do?sys_id="+id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 07:08 AM
//I would go with this function to create a link to a table.
var sLink = createLinkForObject(current.getTableName(),current.sys_id, current.number);
template.print(sLink);
function createLinkForObject(strTableName, strSysID, number){
return '<a href="' + gs.getProperty('glide.servlet.uri') + gs.generateURL(strTableName, strSysID) + '">' + number + '</a>';
}
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 08:59 AM
Sure, Thanks!