- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2022 03:10 AM
Field - Ticket number should come as a hyperlink on notification. I tried with insert link it gives the display value with hyperlink but on clicking it comes as Record not found. I think the URL is not correct...How to make it refer to current record.?? Any help will be appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2022 04:18 AM
Hi,
Its because of the display value of the field in the table.
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2022 03:54 AM
Hi,
Just now tested in my PDI you have to use ${URI} or ${URI_REF} in message HTML
Something like below screenshot:
Output:
By clicking on the hyper link it will take to the created record
The difference between the ${URI} or ${URI_REF} is if you use ${URI} it will print the hyperlink text as LINK or if you use ${URI_REF} it will print the hyperlink text as display field of the triggered table.
Check for more info on DOCS
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2022 04:11 AM
There are 2 fields actually number and ticket number , if i use URI_REF , it shows for number field..not ticket number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2022 04:18 AM
Hi,
Its because of the display value of the field in the table.
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2022 05:07 AM
If you want to show only ticket number you have to use emai_script.
Sample code below:
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var link = createLinkForObject(current.getTableName(), current.getUniqueValue(), current.getValue("u_days_left"));
template.print("Email Script: " + link);
function createLinkForObject(strTableName, strSysID, strDays) {
var url = gs.getProperty('glide.servlet.uri') + gs.generateURL(strTableName, strSysID);
return '<a href="' + url + '">' + strDays + '</a>';
}
})(current, template, email, email_action, event);
O/p:
Murthy