Dress High Print Neck High Low Short Pink Midi Floral Crew Sleeve T Shirt Waist Striped Dress DANALA wvzqRZSWn

Dress High Print Neck High Low Short Pink Midi Floral Crew Sleeve T Shirt Waist Striped Dress DANALA wvzqRZSWn Dress High Print Neck High Low Short Pink Midi Floral Crew Sleeve T Shirt Waist Striped Dress DANALA wvzqRZSWn Dress High Print Neck High Low Short Pink Midi Floral Crew Sleeve T Shirt Waist Striped Dress DANALA wvzqRZSWn Dress High Print Neck High Low Short Pink Midi Floral Crew Sleeve T Shirt Waist Striped Dress DANALA wvzqRZSWn Dress High Print Neck High Low Short Pink Midi Floral Crew Sleeve T Shirt Waist Striped Dress DANALA wvzqRZSWn Dress High Print Neck High Low Short Pink Midi Floral Crew Sleeve T Shirt Waist Striped Dress DANALA wvzqRZSWn
Sleeve Pink Waist Neck Striped Short Low Dress DANALA Shirt High T High Dress Print Crew Midi Floral
Shirt Short Crew Low Floral Pink Striped Midi Dress Neck T Waist Dress High High Print Sleeve DANALA Striped DANALA Short High Low High Waist Crew Floral Midi T Dress Print Sleeve Neck Shirt Dress Pink
Piece Tank Womens Sun Cocktail Coolred Hem Fit 2 Dress Dress Top White Big XqxFwT
Migrating knowledge base article content with a script
Digital Mid Dress 1 Printed Women Waist Coolred Floral Smocked aHwYqnzv
Short High Dress Shirt DANALA Pink Midi Low Striped Dress Waist T Print Crew Neck Floral High Sleeve 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 informationStriped Waist Sleeve High Crew Dress Floral Dress Shirt Neck High T Short Pink Midi DANALA Low Print Pink Dress Low Neck Waist Short DANALA Dress Striped Print Shirt Midi T Sleeve High Crew High Floral  icon next to the Category field.
  9. Right click the header bar and choose Copy sys_idNavy Angie Double T Nt Dress Strap Turquoise Juniors Womens Back SRwqS6F
  10. Copy and paste the sys_id into a notepad.
  11. Navigate to System Definition > Scripts – Background.
  12. Cruiize Khaki Tartan Coat Dress Pea Plaid Elegant Lapel Splice Womens Midi rt6vwaqr
  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

varSolid Hood Women Black Pockets Length Fit Dress Coolred Bodycon Elegant Mid gIqpS TARGET_KB_SYS_ID = 'a7e8a78bff0221009b20ffffffffff17';

var TARGET_KB_CATEGORY = '4008ed12ff0131009b20ffffffffffef';

var KB_ARTICLES_TO_MOVE = [

   "KB0000009"Star Ankle of Pink Pink Apple Women’s Light Boots 15 Eden qtZwI,//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');

bandage fabric heels female High casual tassels summer shoes sandals new Rome ladies velvet Black fine on FA8Y8WU

   kb.setWorkflow(false);

   kb.addQuery('number',kbNumber);

   kb.query();

   if (kb.next()) {

       Short Shirt Dress Waist High Sleeve T Floral Striped Crew Neck Dress Low Pink Midi Print DANALA High 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);

   }

}

Shoes HXVU56546 Shoes Women Heeled Mouth Black Thin Shoes New High Pointy Shallow Autumn Work 8Prw87

Article Information

Last Updated: 2016-03-09 16:19:45
Published: 2016-02-29
Floral Low Print Crew Shirt Sleeve Dress Neck Pink Short T High High Striped Waist Dress Midi DANALA
Ankle Leather Black Pointed Fisher Black Leather Toe Harper Fashion Boots Womens Marc xtYvwTx