Is there a way to move articles from one Knowledge base to another?

Jiali Zhou
Giga Contributor

I put more thant 10 articles in one knowledge base. Now, due to business needs, I need to transfer all the articles into another knowledge base. I retired them but I can't change the knowledge base field as I want. What can I do? And is there any easier way to transfer all the articles?

find_real_file.png

5 REPLIES 5

Raghu Ram Y
Kilo Sage

Hi @Jiali Zhou 

Run a background script and update the Knowledge base..

var kb = new GlideRecord('kb_knowledge');
kb.addEncodedQuery('write your query here');
kb.query();
while(kb.next())
{
kb.kb_knowledge_base = "Provide new Knowledge base sysid";
kb.update();
}

Please mark my answer as correct/helpful, if it works..

++ If you want to update stage/state as well, then add that field also in the script and update it.. that will help you..

Hi, Have you tried my suggestion?

Mark Manders
Mega Patron

The script provided by Raghu will work, but you will still have your articles in 'retired' state. To prevent having to run several scripts, you may want to add the changing of stage as well.

If my answer helped you in any way, please then mark it as helpful. If it resolved the issue, please mark it as correct.

Mark


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark