Email KB Article

ryan86
Kilo Expert

Hi all,

I am looking for a way to email a link to a KB Article. I know there is already an "email" option within the OOB options, but we require the email to send from the users Outlook rather than from within ServiceNow.

I would prefer to have a "button" next to the "Edit Article" option, which opens the users default email client (Outlook), but I cannot find a way of adding this UI action? We require it to populate the Subject field with the KB Article Number and Title, and then populate the Body with a link to the article.

At present, I have simply edited the OOB code for the Email link found within Knowledge Base->Administration->Navigation Add-Ons to the following:

function emailArticle() {

var i = document.getElementById("sys_id");
    if {
          var id = i.value;

    }

var text = "https://ourCompany.service-now.com/kb_view.do?sys_id=";


    popupOpenEmailClient("mailto:?subject=KB Article&body=" + text + id);

}


This opens the mail client, and populates the subject and body. However, I need to get the "sysparm_article=KBNUMBER" instead of submitting the sys_id for the link to work. How can I find the "sysparm_article" attribute by using the sys_id attribute?  


All help appreciated!






6 REPLIES 6

Great, it works!



I really should of noticed that, but I guess it's a case of not being able to see the wood for the trees.



Thanks Mark,



Ryan


Can you do this with the Express version?