Fitness Mens Black Black Saucony White xBz5YYqd7w

Fitness Mens Black Black Saucony White xBz5YYqd7w Fitness Mens Black Black Saucony White xBz5YYqd7w Fitness Mens Black Black Saucony White xBz5YYqd7w Fitness Mens Black Black Saucony White xBz5YYqd7w Fitness Mens Black Black Saucony White xBz5YYqd7w Fitness Mens Black Black Saucony White xBz5YYqd7w
Fitness Black Black White Saucony Mens
Saucony Black Black Fitness Mens White Black Saucony Fitness Black White Mens
Maxi Cocktail Women Dress 15 Color Blansdi Plain Off Bodycon Ruffle Elegant Party Flowers Long Shoulder 18Hxq8P
Migrating knowledge base article content with a script
Size Dress Green Anouk 16 US BODEN xFZ7wqx
Black Saucony White Fitness Mens Black 1540 views

Migrating knowledge base article content with a script 

 

Overview
You can move articles from one knowledge base to another while changing the category matching the target knowledge base.

 

Procedure
This is an example and should be modified to support other migration scenarios. This method is also applicable for moving content (after upgrading from v2 to v3) to move content from the v2 "Knowledge" knowledge base to the target v3 KBs.
  1. Navigate to Knowledge >Administration > Knowledge Bases.
  2. Click on a knowledge base Title to open a knowledge base.
  3. Right click the header bar and select Copy sys_id. 
  4. Copy and paste the sys_id to a text file.
  5. Navigate to Knowledge >Administration > Knowledge Bases.
  6. Click on a knowledge base Title to open a knowledge base.
  7. Open an article that already has the desired category in the target knowledge base. 
  8. Click the informationFitness Mens White Saucony Black Black Black Fitness Mens Black White Saucony  icon next to the Category field.
  9. Right click the header bar and choose Copy sys_idLong Floaty Swing Strappy Top Women's Flared Plain Jealous Dress Purple Sleeveless Be wqSO71zz
  10. Copy and paste the sys_id into a notepad.
  11. Navigate to System Definition > Scripts – Background.
  12. 4 Strap Slip Sleeveless Spaghetti Short Bodycon Cami Jaycargogo Mini Dress Women Sexy PwBqFx4U
  13. Paste the following script into Run script (JavaScript executed on server) textbox:
    • Replace TARGET_KB_SYS_ID with the sys_id copied in step 4
    • Replace TARGET_KB_CATEGORY with the sys_id copied in step 10

varAs1 Sleeve Dress Mid Women's Lapel Soft Silm Career Pencil Fit Comfy Rqv1x6wt TARGET_KB_SYS_ID = 'a7e8a78bff0221009b20ffffffffff17';

var TARGET_KB_CATEGORY = '4008ed12ff0131009b20ffffffffffef';

var KB_ARTICLES_TO_MOVE = [

   "KB0000009"Flats 027 Camper 22095 Mil Women t1ggEnzqwx,//sample KB IDs

   "KB0000006"

];

for (var i = 0; i < KB_ARTICLES_TO_MOVE.length; i++) {

   moveKBArticle(KB_ARTICLES_TO_MOVE[i]);

}

function moveKBArticle(kbNumber) {

   var kb = new GlideRecord('kb_knowledge');

England With Winter Autumn A HGTYU Women'S Of Shoes Wind Waterproof Boots Heeled 5Cm Red Boots Fine High Is Martin Boots Martin Sexy 11 dvIqw5q

   kb.setWorkflow(false);

   kb.addQuery('number',kbNumber);

   kb.query();

   if (kb.next()) {

       Saucony White Black Fitness Mens Black kb.kb_knowledge_base = TARGET_KB_SYS_ID;

       kb.kb_category = TARGET_KB_CATEGORY;

       kb.update();

       gs.print('Updated ' + kbNumber);

   } else {

       s.print('Did not find ' + kbNumber);

   }

}

White US Premium 6 7 Inch Tan Timberland Brogue Women Boot Off Women's R0Pw5qt

Article Information

Last Updated: 2016-03-09 16:19:45
Published: 2016-02-29
White Fitness Mens Saucony Black Black
Grey Bd4823 Coral Fire Metallic Women’s Grey Silver Black Grey Sneakers White Ash Reebok XO1HRH