Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to publish multiple Knowledge at once.

Ohki_Yamamoto
Tera Guru

Is there a way to publish multiple Knowledge in bulk in OOTB?
Currently, we are only aware of the procedure to publish knowledge one by one from the form screen.

2 REPLIES 2

Harish KM
Kilo Patron
Kilo Patron

You can update via background script as well

you can go with this

kb.addEncodedQuery('workflow_state=draft^ORworkflow_state=review');

or

kb.addEncodedQuery('numberINKB0010017,KB0010016');

var kb = new GlideRecord('kb_knowledge');
kb.addEncodedQuery('workflow_state=draft^ORworkflow_state=review'); // get the articles you want to publish
kb.query();

while(kb.next())
{
kb.workflow_state = 'published'; //choice value for Published state
kb.update();
}

Regards
Harish

Thank you for your response.

I understand that the script allows multiple knowledge to be published at once.


Is it possible to achieve this with the OOTB function instead of a script?