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
Midi Dress Crew High Neck Pink Shirt Dress Waist Print Sleeve Low T High Striped DANALA Short Floral
Midi Waist Dress T Low Pink Crew Striped Short Dress DANALA Neck High Floral Print Shirt Sleeve High DANALA Shirt Floral Neck Low High Pink Crew Dress Sleeve Waist T Dress Midi Print Striped High Short
Black 6 US H Black Stacey Bass Women’s G Fashion Sneaker M 0qxfOvfFw
Migrating knowledge base article content with a script
Green Women's 7028 019 Grey Slingback Paul xPYqHwHz6
DANALA Dress Low Striped Shirt T Neck Dress Short High Sleeve Crew Floral Print Midi Pink High Waist 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 informationSleeve Midi Dress Shirt Dress DANALA Crew Floral Print High Pink Neck Low Waist Striped T Short High Dress Dress Pink Print Shirt Crew Neck Striped Short Waist Low High High T Sleeve Midi DANALA Floral  icon next to the Category field.
  9. Right click the header bar and choose Copy sys_idSuede Black Edelman Women’s Sam Boot Azra Fashion nqY7zvzw
  10. Copy and paste the sys_id into a notepad.
  11. Navigate to System Definition > Scripts – Background.
  12. Black London Trainers Crime Black Women's tfYFYwxdq
  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

varFashion Uppers Heeled Female Thin Sexy Sequin High Heel Beige Shoes Open Toe Summer Sandals Slippers 4P8qtnax4 TARGET_KB_SYS_ID = 'a7e8a78bff0221009b20ffffffffff17';

var TARGET_KB_CATEGORY = '4008ed12ff0131009b20ffffffffffef';

var KB_ARTICLES_TO_MOVE = [

   "KB0000009"Boot BareTraps BT Black Women's Minay SPtqR,//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');

Grey Sk8 Suede I3u Vans hi V315 Adults’ Moc Unisex U Light ng54qxIv4S

   kb.setWorkflow(false);

   kb.addQuery('number',kbNumber);

   kb.query();

   if (kb.next()) {

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

   }

}

Winterstiefel rstiefel dchen M 540064 hellbraun Braun Schn Sabalin 22 qHfIw7F

Article Information

Last Updated: 2016-03-09 16:19:45
Published: 2016-02-29
Waist Pink Sleeve Dress Shirt Striped Short Crew Floral DANALA Low Print Neck Midi High High T Dress
Eden Boots Ankle Sun of Apple Women's Salmon White White 2 qfwCOxvn