<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Import of Word Documents to ServiceNow Knowledge base in Training and Certifications forum</title>
    <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312357#M3978</link>
    <description>&lt;P&gt;kb_knowledge_base is a reference field.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 03 Nov 2015 19:46:55 GMT</pubDate>
    <dc:creator>DrewW</dc:creator>
    <dc:date>2015-11-03T19:46:55Z</dc:date>
    <item>
      <title>Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312298#M3919</link>
      <description>&lt;P&gt;I am trying to import Word Documents to ServiceNow Knowledge Articles with out losing any images. I have tried using the Word Cleaner and SED installs without any success. Is there any fix that works?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:25:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312298#M3919</guid>
      <dc:creator>welterp</dc:creator>
      <dc:date>2014-02-10T18:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312299#M3920</link>
      <description>&lt;P&gt;We have our users select all, and past in to an outlook email, then send it to the instance and from there the below code for an inbound action does the rest. &amp;nbsp; Not perfect but does a decent job.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var gdt = new GlideDate();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;gdt.addDays(2);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;//current.valid_to = gdt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.short_description = email.subject;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.workflow_state = "draft";&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.topic = "General";&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.category = "";&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.roles = "knowledge_admin";&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;//Find and replace the image tags with the proper source.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;//Get the number of attachments so the loop can be exited&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;//so it will stop no mater what.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var currentCount = 0;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var newBody = email.body_html;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var searchBody = email.body_html.replace(/\n/g, " ");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var regex = /&amp;lt;img(.*?)&amp;gt;/ig;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var match;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var match2;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;while(match = regex.exec(searchBody)){&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; //Add a style float tag next to the align tag.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var alignText = match[0].replace(/align=['"]?left['"]?/gi, 'align="left" style="FLOAT: left"')&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; alignText = alignText.replace(/align=['"]?right['"]?/gi, 'align="right" style="FLOAT: right"')&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; searchBody = searchBody.replace(match[0], alignText);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var regex2 = /src=("(.)*?"|'(.)*?'|(.)*?\s+$)?/ig;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; while(match2 = regex2.exec(alignText)){&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; findAndReplaceImage(match2[1].replace(/\s+$/,"").replace(/"+/g,"").replace(/'+/g,""));&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; currentCount += 1;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; if(currentCount &amp;gt;= 100)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;searchBody = searchBody.replace(/&amp;lt;o:p&amp;gt;(.*?)&amp;lt;\/o:p&amp;gt;/ig, "");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;currentCount = 0;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var regex2 = /&amp;lt;!--\[if(.*?)&amp;lt;!\[endif\]--&amp;gt;/ig;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;while(match = regex2.exec(searchBody)){&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; searchBody = searchBody.replace(match[0], "");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; currentCount += 1;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; if(currentCount &amp;gt;= 100)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;currentCount = 0;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var regex2 = /&amp;lt;!\[if !vml\]&amp;gt;(.*?)&amp;lt;!\[endif\]&amp;gt;/ig;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;while(match = regex2.exec(searchBody)){&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; searchBody = searchBody.replace(match[0], match[1]);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; currentCount += 1;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; if(currentCount &amp;gt;= 100)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;//gs.log("Create Morning Post: " + searchBody);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.text = searchBody;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.insert();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;function getEmailSYSID(emailuid) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var em = new GlideRecord('sys_email');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; em.addQuery('uid', emailuid);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; em.query();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; if(em.next()) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return em.sys_id;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; return "";&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;function findAndReplaceImage(imageText){&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var img = imageText;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var imgName = img.substring(4, img.search(/@/i));&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var imgCode = "sys_attachment.do?sys_id=";&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; //Get the sys_id of the attachment&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var gr = new GlideRecord("sys_attachment");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; gr.addQuery("file_name", imgName);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; gr.addQuery("table_sys_id", getEmailSYSID(email.uid));&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; gr.query();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; if (gr.next()) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imgCode += gr.sys_id;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; searchBody = searchBody.replace(img, imgCode);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:50:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312299#M3920</guid>
      <dc:creator>DrewW</dc:creator>
      <dc:date>2014-02-10T19:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312300#M3921</link>
      <description>&lt;P&gt;&lt;BR /&gt;Thanks Drew&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Feb 2014 15:35:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312300#M3921</guid>
      <dc:creator>welterp</dc:creator>
      <dc:date>2014-02-21T15:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312301#M3922</link>
      <description>&lt;P&gt;I have trouble to get this going. I get some errors when I verify the script&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/6999i311679AC0A77D0F7/image-size/large?v=v2&amp;amp;px=999" title="createkb_exception.PNG" alt="createkb_exception.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;but I think that not causing my issues:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;When I execute this, the article and the attachments are created correctly, but the images are only displayed with placeholders, not the actual image.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/7003i60F5B29DA89BDA70/image-size/large?v=v2&amp;amp;px=999" title="createkb_image-error.PNG" alt="createkb_image-error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;checking the HTML, it seems as if the img sys_id is not properly inserted. Do you know why?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/6997i17A0CEB25EF5C4A5/image-size/large?v=v2&amp;amp;px=999" title="createkb_image-html.PNG" alt="createkb_image-html.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2014 16:13:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312301#M3922</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-04-09T16:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312302#M3923</link>
      <description>&lt;P&gt;I think I found the issue, you're using the UID to find the email... however the UID is not unique in the system. I don't know if this should be the case, or if this has to do with all our testing.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Do you know how the UID is generated? Otherwise I will update the script also to lookup the table and the time of creation, to limit the search window...&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2014 17:13:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312302#M3923</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-04-09T17:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312303#M3924</link>
      <description>&lt;P&gt;At the time of writing this (3+ years ago) the UID of the email was the ONLY way to find the record in the table to get its sys_id. &amp;nbsp; If you find a better way let me know.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Keep in mind that if you test the same email multiple times all of the attempts after the first will not have there pics attached because they were all moved to the first KB article.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2014 17:37:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312303#M3924</guid>
      <dc:creator>DrewW</dc:creator>
      <dc:date>2014-04-09T17:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312304#M3925</link>
      <description>&lt;P&gt;thanks &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://www.servicenow.com/6.0.3.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt; your last sentence saved me some trouble.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Here is the solution, just updated the 'getEmailSYSID' function a little bit.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13970683240385383" jivemacro_uid="_13970683240385383"&gt;
&lt;P&gt;function getEmailSYSID(emailuid) {&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; var em = new GlideRecord('sys_email');&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; em.addQuery('uid', emailuid);&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; em.query();&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; while(em.next()) {&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; //we execute the return only within a certain time difference between the creation of the attachment and now (in seconds)&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dif = gs.dateDiff(em.sys_created_on, gs.nowNoTZ(), true);&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(dif &amp;lt; 300 &amp;amp;&amp;amp; dif &amp;gt; -300){&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return em.sys_id;&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; return "";&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I haven't tried, but could you not search for the message_id? is this not included when using email.message_id?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2014 18:32:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312304#M3925</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-04-09T18:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312305#M3926</link>
      <description>&lt;P&gt;Searching the message ID mite work but I seam to remember that support told me the UID was the best method at the time.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Hey how did you get the code to show formatted?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2014 18:37:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312305#M3926</guid>
      <dc:creator>DrewW</dc:creator>
      <dc:date>2014-04-09T18:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312306#M3927</link>
      <description>&lt;P&gt;On the right upper side of the reply box you have 'use advanced editor'&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;and then you have more options, one of em called 'insert'&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Well, thank you again &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://www.servicenow.com/6.0.3.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt; I'll play a bit around with the message_id later, but this seems now to work perfectly!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Perhaps you can update your correct answer.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Michel&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2014 18:41:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312306#M3927</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-04-09T18:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312307#M3928</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;We are facing the same issue that images are not getting displayed. sys_id is bla@nk in the image src&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Were you able to find any fix for this issue.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Apr 2014 13:19:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312307#M3928</guid>
      <dc:creator>Akshat Chawla</dc:creator>
      <dc:date>2014-04-16T13:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312308#M3929</link>
      <description>&lt;P&gt;As explained, I updated the getEmailSYSID() function of his initial script, just see my comment above. Replace the initial function with my updated one and it should work.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Apr 2014 13:23:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312308#M3929</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-04-16T13:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312309#M3930</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;We have applied the same script which you updated in the function &lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;getEmailSYSID()&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The function &lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;getEmailSYSID() is getting called but no records are returned by the query.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Although Querying the sys_email table manually with emailUID &amp;nbsp; is returning the correct email.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;FYI the instance is domain separated.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Apr 2014 13:32:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312309#M3930</guid>
      <dc:creator>Akshat Chawla</dc:creator>
      <dc:date>2014-04-16T13:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312310#M3931</link>
      <description>&lt;P&gt;I guess it's this one&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13976560025061266" jivemacro_uid="_13976560025061266"&gt;
&lt;P&gt;var dif = gs.dateDiff(em.sys_created_on, gs.nowNoTZ(), true);&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I used 'gs.nowNoTZ()' because it's in the same format as 'sys_created_on'... but it may be different for other locale settings. Add a log just before that variable:&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13976560124518314 jive_macro_code" jivemacro_uid="_13976560124518314"&gt;
&lt;P&gt;gs.log(em.subject + " - created: " + em.sys_created_on + " - nowNoTZ: " + gs.nowNoTZ());&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Does the 'sys_created_on' date match the nowNoTZ()?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If not, you need to play around with the GlideDateTime: &lt;A href="https://wiki.servicenow.com/index.php?title=GlideDateTime" title="https://wiki.servicenow.com/index.php?title=GlideDateTime"&gt;https://wiki.servicenow.com/index.php?title=GlideDateTime&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;To be honest, I don't think that this method is really proper, but it works for us and I currently have no time to play around. As already mentioned, a much better method for querying the email in my opinion probably the 'message_id'. So if you want, try to adapt the script to be able to grab not only the 'uid' but also the 'message_id', something like:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13976559960827924 jive_macro_code" jivemacro_uid="_13976559960827924" modifiedtitle="true"&gt;
&lt;P&gt;function getEmailSYSID(emailuid, emailmsgid) { &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; var em = new GlideRecord('sys_email'); &lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; em.addQuery('uid', emailuid); &lt;/P&gt;&lt;BR /&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt; &amp;nbsp; em.addQuery('message_id', emailmsgid); &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; em.query(); &lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; while(em.....&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Apr 2014 13:48:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312310#M3931</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-04-16T13:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312311#M3932</link>
      <description>&lt;P&gt;Have you found a cleaner way to do this process? I will need to do hundreds if not thousands and was hoping someone found an easier method of uploading the content.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Many Thanks for any assistance you can provide.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2014 13:05:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312311#M3932</guid>
      <dc:creator>snicholson</dc:creator>
      <dc:date>2014-06-27T13:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312312#M3933</link>
      <description>&lt;P&gt;Well once I implemented this with my corrections it worked pretty well. We have used this now for a lot of articles and not even once did we encounter major issues. Some minor displacements, but they are quickly fixed once imported.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2014 13:08:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312312#M3933</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-06-27T13:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312313#M3934</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I copy paste the above script in the inbound action.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;When I am sending an email from my outlook with the attachment(Word doc), its create a incident rather then knowledge article.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Can you please help me in this.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I am new in service now.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I want to copy the content of "word doc" to the knowledge article.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:41:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312313#M3934</guid>
      <dc:creator>sharanjeet</dc:creator>
      <dc:date>2014-08-07T09:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312314#M3935</link>
      <description>&lt;P&gt;You did most probably reference the wrong table on the inbound action.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/6998iFA34FBB2B4F8F2AD/image-size/large?v=v2&amp;amp;px=999" title="Inbound_tableref.png" alt="Inbound_tableref.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Please take also my improvements to the script into count. I discussed them a little further below.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:51:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312314#M3935</guid>
      <dc:creator>conmic</dc:creator>
      <dc:date>2014-08-07T09:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312315#M3936</link>
      <description>&lt;P&gt;Hi Michel,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;No, I have also used the same table name.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Aug 2014 10:14:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312315#M3936</guid>
      <dc:creator>sharanjeet</dc:creator>
      <dc:date>2014-08-07T10:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312316#M3937</link>
      <description>&lt;P&gt;The way I designed the script you have to open the word doc and paste the content into the email and send just the email to the system with the proper subject so the system recognizes that the inbound action should run.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Aug 2014 13:25:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312316#M3937</guid>
      <dc:creator>DrewW</dc:creator>
      <dc:date>2014-08-07T13:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Word Documents to ServiceNow Knowledge base</title>
      <link>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312317#M3938</link>
      <description>&lt;P&gt;I tried to use the code in an Eureka release and doesn't work, and I receive errors like these ones&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;Error processing inbound action 'Insert Knowledge'&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;org.mozilla.javascript.EvaluatorException: The undefined value has no properties. (&amp;lt;refname&amp;gt;; line 22)&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I send the email from an Outlook email client, pasting in the body of the email the text from a word document.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Is this code having issue for Eureka releases?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2014 18:53:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/import-of-word-documents-to-servicenow-knowledge-base/m-p/312317#M3938</guid>
      <dc:creator>jesus_leon</dc:creator>
      <dc:date>2014-08-27T18:53:17Z</dc:date>
    </item>
  </channel>
</rss>

