- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2013 12:41 PM
Hi,
I'm trying to customize an email client template for kb_knowledge to send a clickable link with the Email navigation link from kb_home. I've tried ${URI} and ${URI_REF}, but these put in long, ugly URLs that aren't clickable. I've also added a URL calculation field to my kb_knowledge form, but when I put this field on my template with
<a href="${u_url}" target="_blank">${number}</a>
the emailed link is truncated to:
<a href="/kb_view.do?sysparm_article=KB10090" target="_blank">KB10090</a>.
If I then add the missing part of the URL:
<a href="https://usfdev.service-now${u_url}" target="_blank">${number}</a>
I end up with duplication:
<a href="https://usfdev.service-nowhttps//usfdev.service-now.com/kb_view.do?sysparm_article=KB10090" target="_blank">KB10090</a>
Any suggestions on how to get a simple clickable link from a KB article in an email client template?
Thanks, Jim
Solved! Go to Solution.
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2013 09:41 AM
Thanks to some deep digging by Sam Polk at the SNOW Help Desk with an assist from Cesar Sandoval, I have an answer at last to why my email URLs were being truncated and none on the rest of you were seeing this.
About a year ago I followed a tip to change the body field type on sys_email from String to HTML. This allows you to use the TinyMCE HTML editor in the email client. The unintended consequence is that full URLs links are changed to relative URL links during the process of changing the sys_email body text from plain text to HTML, according to Sam.
Thanks to Sam, Cesar and all who tried to help me.
Jim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2013 07:11 AM
you can use a mail script with something like this....
url = gs.getProperty('glide.servlet.uri') + gs.generateURL(current.sys_class_name, current.sys_id);
template.print("<a href='" + url + "'>" + current.number + "</a>");
also you can use this via glide record:
https://wiki.servicenow.com/index.php?title=GlideRecord#getLink
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2013 02:38 PM
Hi Jonathan,
Thanks for the response. I get the same result. The URL starts with /grc_policy.do. If I add the missing part of the URL to the string, it doubles it.
Take care, Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2013 01:07 PM
<mail_script>
template.print('<a href="' + gs.getProperty("glide.servlet.uri") + 'kb_view.do?sys_kb_id=' + '$current.number">KB Article</a>');
</mail_script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2013 02:50 PM
Hi Phillip,
Here's what I get with this script:
I think I need to play around with the number part, but the initial problem is still there.
Thanks, Jim