GlideSubstituteURL().generateURL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2017 03:25 AM
Hi All,
Can anyone explain me the usage of 'GlideSubstituteURL().generateURL' in the script below or in general.
Script:
template.print("<br />");
var gr = new GlideRecord("kb_knowledge");
gr.addQuery('source', current.sys_id);
gr.query();
while (gr.next()) {
var link = new GlideSubstituteURL().generateURL(gr, '');
var title = gr.number;
if (gr.short_description != '') {
title+= " - " + gr.short_description;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2017 08:06 AM
template.print prints out content in email notifications.
In your script there, template.print is printing out an anchor tag (or hyperlink), with a link back to the GlideRecord, to the email notification.