<?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: Can I run the instant publish on articles in draft state? in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854350#M426129</link>
    <description>&lt;P&gt;Okay, this is hastily knocked up, and seems to work on articles that are currently draft but NOT "review":&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;(edited - &amp;lt;pre&amp;gt; tags barfed)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.log("1. Starting 'update-kb' script","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.setSession.setStrictQuery(true);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- first, we use a GlideRecord against the Knowledgebase table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;var pending = new GlideRecord('kb_knowledge');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- create our query:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;pending.addEncodedQuery('workflow_state=draft^ORworkflow_state=review');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- call that query:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;pending.query();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.log("2. found " + pending.getRowCount() + " records to update.","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- now update each record found:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;while(pending.next())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // -- flick workflow state over&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; gs.log("3. changing: " + pending.number + " to PUBLISHED.","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; pending.workflow_state = 'published';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; pending.update();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.log("4. Completed script","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;This should write out to your script log, but under a different "source" so it should identify the records that have been amended, should you need an audit trail. &amp;nbsp; I trust you'll run it on a testbed first!&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 22 Mar 2017 15:55:21 GMT</pubDate>
    <dc:creator>Dave Smith1</dc:creator>
    <dc:date>2017-03-22T15:55:21Z</dc:date>
    <item>
      <title>Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854339#M426118</link>
      <description>&lt;P&gt;Can I run the instant publish on articles already in draft state?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The articles have been created and vetted by our Knowledge team so I just need to move them to a published state. Is this possible?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 20:11:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854339#M426118</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-21T20:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854340#M426119</link>
      <description>&lt;P&gt;Not sure what you mean by "&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;run the instant publish&lt;/SPAN&gt;" but if you mean "can draft articles be moved to published" then yes. It's the "Publish" button, usually located top-right.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;However, in terms of organisational procedures - if the articles have been vetted by the knowledge team, surely it's up to them to publish them...?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;What workflow is on your KB at the moment - is it "Approval Publish" or "Instant Publish"...?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2017 21:53:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854340#M426119</guid>
      <dc:creator>Dave Smith1</dc:creator>
      <dc:date>2017-03-21T21:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854341#M426120</link>
      <description>&lt;P&gt;Dave,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thank you for the response. What happened was, the articles were all being created an input manually over the last few weeks and the workflow was set to Approval Publish. Now we've got 300+ articles that are sitting in a draft state that we need to get to a published state. I was hoping to be able to change the workflow settings to instant publish and force that to run against all the current draft state articles. If that makes sense?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 01:22:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854341#M426120</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-22T01:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854342#M426121</link>
      <description>&lt;P&gt;"Workflow" is the field you are talking about - it's actually list-editable, so you could just go to a list of those articles, show the Workflow column, and then update their Workflow value to Published to instantly publish them.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screenshot_1.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/94573i4256C048B8D84C5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;EDIT: seems like out of box behavior is to disable list editing so this might not work for you. You could still set the state of these articles using a background script. Alternatively, if you think this will be a common occurrence, you could make the Publish/Retire UI actions visible in lists, so you could select multiple rows, then use the UI action on them all at the same time. See &lt;A href="https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/administer/list-administration/concept/c_UIActions.html" title="https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/administer/list-administration/concept/c_UIActions.html"&gt;UI actions&lt;/A&gt; &amp;nbsp; for more on that.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 01:33:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854342#M426121</guid>
      <dc:creator>Patrick Schult2</dc:creator>
      <dc:date>2017-03-22T01:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854343#M426122</link>
      <description>&lt;P&gt;Patrick, inline editing is sweet and I'm leaning towards that as a last effort to get this accomplished. It's just very cumbersome to do 300 times! Not impossible certainly but that's why I was hoping to somehow fan-dangle (technical term) re-running that instant publish script again and just getting these all updated at once!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 01:36:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854343#M426122</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-22T01:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854344#M426123</link>
      <description>&lt;P&gt;If you do decide to enable list-editing like we did, you can actually edit multiple rows at once, so you could still edit multiple articles in one go. I edited my first response right after it occurred to me that we had customized it to allow list-editing, but you could tick a box on the "Publish" UI action to let it run on lists and you could get the same effect as using it on the form (but in a list). &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 01:40:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854344#M426123</guid>
      <dc:creator>Patrick Schult2</dc:creator>
      <dc:date>2017-03-22T01:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854345#M426124</link>
      <description>&lt;P&gt;Ahh, so I can edit the action on selected rows button to include "publish" you're saying? Sounds viable.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 02:18:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854345#M426124</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-22T02:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854346#M426125</link>
      <description>&lt;PRE __jive_macro_name="quote" class="jive_macro_quote jive_text_macro" data-renderedposition="18_8_1026_125" modifiedtitle="true"&gt;&lt;P&gt;Ben Hughey wrote:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thank you for the response. What happened was, the articles were all being created an input manually over the last few weeks and the workflow was set to Approval Publish. Now we've got 300+ articles that are sitting in a draft state that we need to get to a published state. I was hoping to be able to change the workflow settings to instant publish and force that to run against all the current draft state articles. If that makes sense?&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Note that they'll still be sitting in &lt;EM&gt;draft&lt;/EM&gt; state until someone hits the &lt;STRONG&gt;Publish&lt;/STRONG&gt; button. &lt;SPAN style="text-decoration: underline;"&gt;Approval Publish&lt;/SPAN&gt; simply means once someone hits the "published" button, it moves into a "Review" state that requires approval to continue onto visibility.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;So, once changing the workflow to Instant Publish you've got two approaches here:&lt;/P&gt;&lt;BR /&gt;&lt;OL&gt;&lt;LI&gt;if the articles are still in &lt;EM&gt;draft&lt;/EM&gt;, have your knowledge team click the "publish" button to make them visible.&lt;/LI&gt;&lt;LI&gt;if the articles are still in &lt;EM&gt;review&lt;/EM&gt;, have a Knowledge Manager for that KB (i.e.: someone with &lt;STRONG&gt;knowledge_manager&lt;/STRONG&gt; role) mass-approve the outstanding 300+ articles (which is what I think you're after).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;You may also want to review and discuss your knowledge management process with the knowledge team and formalise the process/policy with them.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 09:19:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854346#M426125</guid>
      <dc:creator>Dave Smith1</dc:creator>
      <dc:date>2017-03-22T09:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854347#M426126</link>
      <description>&lt;P&gt;Dave,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thank you for taking the time as well.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;What I'm trying to do is get all 300 articles from Draft to Published without having to manually click each one. It sounds like that's not an option though!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;We have reviewed our policies and process around this going forward but that doesn't fix what's already happened! &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" data-renderedposition="134_723.625_16_16" src="https://www.servicenow.com/8.0.4.21bdc7e/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Ben-&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 13:23:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854347#M426126</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-22T13:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854348#M426127</link>
      <description>&lt;P&gt;If you wish to move all articles that are currently "draft" to show "published" then that'll take me 10-15 mins or so to knock up a server-side script to do the job, if that helps - given it's a one-off switchover.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 13:31:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854348#M426127</guid>
      <dc:creator>Dave Smith1</dc:creator>
      <dc:date>2017-03-22T13:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854349#M426128</link>
      <description>&lt;P&gt;Dave, &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If you could help facilitate that, it would be great! It's a one-time instance for me but, may be beneficial to other's in the community as well. I've found over the last year or so I've gathered a whole heap of useful scripts!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 13:36:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854349#M426128</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-22T13:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854350#M426129</link>
      <description>&lt;P&gt;Okay, this is hastily knocked up, and seems to work on articles that are currently draft but NOT "review":&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;(edited - &amp;lt;pre&amp;gt; tags barfed)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.log("1. Starting 'update-kb' script","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.setSession.setStrictQuery(true);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- first, we use a GlideRecord against the Knowledgebase table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;var pending = new GlideRecord('kb_knowledge');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- create our query:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;pending.addEncodedQuery('workflow_state=draft^ORworkflow_state=review');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- call that query:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;pending.query();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.log("2. found " + pending.getRowCount() + " records to update.","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;// -- now update each record found:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;while(pending.next())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // -- flick workflow state over&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; gs.log("3. changing: " + pending.number + " to PUBLISHED.","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; pending.workflow_state = 'published';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; pending.update();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 8pt;"&gt;&lt;STRONG style="font-family: terminal, monaco;"&gt;gs.log("4. Completed script","UPDATE-KB");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;This should write out to your script log, but under a different "source" so it should identify the records that have been amended, should you need an audit trail. &amp;nbsp; I trust you'll run it on a testbed first!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 15:55:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854350#M426129</guid>
      <dc:creator>Dave Smith1</dc:creator>
      <dc:date>2017-03-22T15:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854351#M426130</link>
      <description>&lt;P&gt;Test bed?! What's a test bed?! &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Just kidding Dave, I'll give this a shot this afternoon. Thanks for all your help!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 16:50:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854351#M426130</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-22T16:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854352#M426131</link>
      <description>&lt;PRE __jive_macro_name="quote" class="jive_macro_quote jive_text_macro" data-renderedposition="39_8_862_115" modifiedtitle="true"&gt;&lt;P&gt;Ben Hughey wrote:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Test bed?! What's a test bed?! &lt;/P&gt;&lt;BR /&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Bwhahaha!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I found it doesn't work for articles already published (and in "review" stage), only for those in draft. Perhaps I need to add a routine that walks to the approval record and flicks it to "approved", but I'm guessing you could mass-update a large list of outstanding approvals jsut as easily.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 17:00:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854352#M426131</guid>
      <dc:creator>Dave Smith1</dc:creator>
      <dc:date>2017-03-22T17:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854353#M426132</link>
      <description>&lt;P&gt;Script worked and changed all the articles in my test instance to published! I'll test again in sub-prod to ensure that the Knowledge Base and Categories don't change once ran!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 18:32:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854353#M426132</guid>
      <dc:creator>bjhughey164</dc:creator>
      <dc:date>2017-03-22T18:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854354#M426133</link>
      <description>&lt;P&gt;Good stuff, fellah - glad to hear it helped!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;For what it's worth, this kinda stuff (GlideRecord, background scripts, etc) is covered on our Scripting courses: &lt;A href="https://www.servicenow.com/services/training-and-certification/scripting-in-servicenow-training.html" title="https://www.servicenow.com/services/training-and-certification/scripting-in-servicenow-training.html"&gt;Scripting in ServiceNow&lt;/A&gt; - if you're interested in taking coding any further.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2017 20:47:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/854354#M426133</guid>
      <dc:creator>Dave Smith1</dc:creator>
      <dc:date>2017-03-22T20:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run the instant publish on articles in draft state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/2544393#M492624</link>
      <description>&lt;P&gt;Publish "Draft" and "Review" state articles:&lt;BR /&gt;Currently there are 877 KB articles persist in our service now repository. In total, 486 KB articles are in "Draft" and "Review" state, which are created from problem as a source task. These KB articles should be published. Currently there are few difficulties to chase each KB authors to publish from their end. So, requesting service now team to publish it from backend. in the approval stage no longer required&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 12:58:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/can-i-run-the-instant-publish-on-articles-in-draft-state/m-p/2544393#M492624</guid>
      <dc:creator>naveen reddy2</dc:creator>
      <dc:date>2023-04-25T12:58:36Z</dc:date>
    </item>
  </channel>
</rss>

