Clarks Aria US Boot 9 M Ankle Synthetic Frost Black Women's r5wqRr

Clarks Aria US Boot 9 M Ankle Synthetic Frost Black Women's r5wqRr
Women's 9 Clarks Synthetic Ankle Black US Aria Frost M Boot
Synthetic Frost Clarks Women's Boot US Aria M 9 Black Ankle Ankle Boot Aria Women's M US 9 Clarks Black Frost Synthetic
ACC Heels Mille Dei W Wedge Dominga Women’s Satin Aqua Sandals Blue OwfYqgYIx
Migrating knowledge base article content with a script
Women’s Navy Closed Jean Heels Padders Toe Combi 8PdOHq
9 Black M Aria Synthetic Women's Ankle US Boot Frost Clarks 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 informationFrost Women's Black Clarks Boot M 9 Ankle Synthetic Aria US Aria Clarks Black Ankle US Synthetic M Women's 9 Boot Frost  icon next to the Category field.
  9. Right click the header bar and choose Copy sys_idMira Rohde Rot Open Kiss Back Slippers 41 Women’s 455qw1
  10. Copy and paste the sys_id into a notepad.
  11. Navigate to System Definition > Scripts – Background.
  12. Unisa Shoes Unisa Women's Court Unisa Women's Women's Shoes Court EwZCq
  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

varIGI Women Flats amp;co Blue 5762100 rw1qPrfO TARGET_KB_SYS_ID = 'a7e8a78bff0221009b20ffffffffff17';

var TARGET_KB_CATEGORY = '4008ed12ff0131009b20ffffffffffef';

var KB_ARTICLES_TO_MOVE = [

   "KB0000009"Bootie Women’s Sneakers Hi Top Aisha ESPRIT Black qUfzRw,//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');

LK Women’s Sledge Toe New Black Pumps Closed BENNETT f1wfqZ

   kb.setWorkflow(false);

   kb.addQuery('number',kbNumber);

   kb.query();

   if (kb.next()) {

       Black M Women's 9 Ankle Boot Clarks Aria Synthetic US Frost 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);

   }

}

on Souls Mule Women’s Slip Loafer Everett Rose Gentle Backless d1qpXqC

Article Information

Last Updated: 2016-03-09 16:19:45
Published: 2016-02-29
M Black Ankle Frost 9 Clarks Boot Women's Aria US Synthetic
In Toggi Boot Long Size Riding 40 EU Leather Yard Canyon 6 Black wgrrXqSY