Knowledge Article Email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 05:11 PM
Trying to build mail script into client template that utilizes ${URI} and takes you to the user view of the kb article.
Have used the following in client template:row
<mail_script>
dothis();
function dothis() {
var servletUri = gs.getProperty('glide.servlet.uri');
template.print(servletUri + 'nav_to.do?uri=kb_view.do?sysparm_article=' + current.number + '\n');
}
</mail_script>
This works and gets me there. The email has the url, but I have found some browser email clients (Outlook Web Access in Safari) display it as string only and not hyper-link. In addition, if you are not logged into the instance and using IE, it loads the page and indicates you don't have permission to view the article.ove
<a href="${URI_REF}"><mail_script>template.print(current.number);</mail_script></a>
The above works, but takes you to the kb article but takes you to the record itself, not the user view of the kb article. Also using URI, will direct you to logon, if you are not already, and then directs you to the article. I have even tried adding sysparms to the URI to force it to a different view, but it still loads the record. I found that the user view under Knowledge Base | View is not the same as opening a KB article record in the kb_view form view.
<a href="${URI+&sysparm_view=kb_view}"><mail_script>template.print(current.number);</mail_script></a>
If I could combine (servletUri + 'nav_to.do?uri=kb_view.do?sysparm_article=' + current.number + '\n'); within <a href> I think that would do it, but have not found a way to make it work. Everything takes me to the kb article record and not the "user view" of the record.
To clarify, I have attached the knowledge record view and the knowledge user view (which is what I want to load)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2018 08:42 AM
Thanks Steven and Shane. I was able to use your samples to create an article link. I changed this line to make it work on my case.
var link = servletUri + '/home?id=kb_article&sys_id='+ current.article_sys_id;