How to move KB articles from one instance to other instance through script with attachments?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 06:52 PM
Hi All,
Can any one please help me on the below task.
How to move KB articles from one instance to other instance through script with attachments?
Is it possible, any one know please guide me on that.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 08:24 PM
Hi Varalakshmi,
I worked on the same requirement few months back. One of the methods which i used is capturing KB articles in an update set and committing the update set in target instance. You can follow the below steps to achieve the same.
1. Create an update set Eg 'KB_Migration_1' and set it as current update set.
2. Open background script and execute the below script.
Script
var gr = new GlideRecord('kb_knowledge');
gr.addQuery('active',true);
gr.setLimit(50);//Its better limit the records to avoid timeout issues
gr.query();
while(gr.next()){
var upd = new GlideUpdateManager2();
upd.saveRecord(gr);
}
3. After capturing the desired KB articles, mark the update set as complete, push it to the target instance and commit the same
4. KB articles will get imported in the target instance with attachments, related lists info, etc..
Apart from the above method you may also use XML export/import but it won't include related lists and attachments. You have to write a separate script to include those details. So i would suggest to go ahead with update set as it makes your migration easier.
-Udhay
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2023 03:05 AM
That doesnt work at all.
Nothing is captured in the U/S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2024 12:19 AM
This worked and save lots of time for me. Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2024 06:26 AM
Does this really capture the attachments? I doubt. Because attachments are data and only configurations are suppose to get captured in the update set right? Correct me if I am wrong. Experts can comment!
Regards,
Anish