Moving articles from one knowledge base to another
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 03:12 PM
We are going to retire a knowledge base and we're looking to move articles to another. Is there an easy way to do this without going through checking out, updating knowledge base and re-publishing the articles?
I was thinking of maybe doing this via script. What is the proper way of doing this?
Thanks.
- Labels:
-
Knowledge Management
- 3,766 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2021 12:14 PM
I have the same question but for the Quebec version. Is there a script that can do this? An answer to a similar article says that you can use
if(knowledge base)
current.setValue('kb', '');
Does anyone know if this is correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2021 06:34 AM
Not sure if you ever got this to work, but there is a fairly useful Service now published Knowledge article on this subject
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0852780
When given a list of knowledge articles and destination sysids for the Knowledge base and the category, it will move all published versions of an article to the target location.
If anyone has any idea on how to move *ALL* versions of an article I'd be most interested to read them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 12:49 PM - edited 12-20-2022 12:53 PM
I know this is a bit late, but I was able to modify the script in this article:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0852780
Simply change the 'moveKBArticle' function to this:
function moveKBArticle(kbNumber) {
var kb = new GlideRecord('kb_knowledge');
kb.autoSysFields(false);
kb.setWorkflow(false);
kb.addQuery('number', kbNumber);
kb.query();
if (!kb.hasNext()){
gs.info('Did not find ' + kbNumber);
return;
}
while (kb.next()) {
kb.kb_knowledge_base = TARGET_KB_SYS_ID;
kb.kb_category = TARGET_KB_CATEGORY;
kb.update();
gs.info('Moved ' + kbNumber + ' to Knowledge Base ' + TARGET_KB_SYS_ID);
}
}
This should loop through all article versions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 01:49 AM
Thanks for the help.