Modifying the KMSCCoreImport script file

Before running the import script, you should modify the KMSCCoreImport script to support any customizations or modifications to the core table.

To modify the KMSCCoreImport script, find the section of the script file that begins with the comment "this is the section of the customized code where additional code should be added ..." then follow the instructions provided by these comments. Essentially, you need to map any fields added to the out-of-box core table and update the field names.

The following is a sample:

//????????????????????????????????????????????????????????????????
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//this is the section of the customized code where additional code
//should be added if the user so desires...the following are a few
//example lines of code
//NOTE: if a field name has a dot delimiter such as in entry.id, in
//javascript it has to be changed to an underscore as in
// entry_id...you can see another //example of this in the example
//code below
//newKMDoc.reference = corerecs.description + " " +
//corerecs.mycustom_field;
//newKMDoc.doctype = corerecs.mycustomdoctype;
//if the customizations to the core table include fields that do
//not directly translate to any fields in the default kmdocument
//table, and yet the user still wants to maintain that data,
//they should follow the instructions in the user guide for how
//to add a new field to the kmdocument table (WARNING: this is
//a very serious and involved task so be sure you know what you
//are doing before taking this step - it is advised that only
//admin users perform any sort //of changes like this). Once the
//new field has been added to the kmdocument table, you can use
//lines like the following example:
//newKMDoc.mynewcustomfield = corerecs.myothercustomizedfield;
//PLEASE NOTE however the caveat that adding new customized fields
//to the kmdocument table impacts many different aspects of the
//program that MUST be considered such as the searching and
//document type/document view structure(s) that represent the raw
//data in end user form...as well as the forms used to edit the
//documents once they have been imported...all of these areas must
//also be considered before making any changes...
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
If you want to create document categories that match the document categories used in IRExpert, see the section of the script that begins:
//in the default setup, the category and subcat fields of the core //table appear not to be used so we will just shove all core //records into a single category within //KM - Service Manager/KM/CoreImport var newcat = system.library.KMCategory.getCategoryIdString ("Service Manager/Knowledge Management/CoreImport", true); newKMDoc.categories[0] = newcat; newKMDoc.generatedcats[0] = "Service Manager/Knowledge Management/CoreImport"; //if however, the cat and subcat fields are used and the user //would like to use them for categorization, then comment out the //three lines above and remove the commenting before the next //lines var newcat = system.library.KMCategory.getCategoryIdString (corerecs.category+"/"+corerecs.subcategory, true); //newKMDoc.categories[0] = newcat; //newKMDoc.generatedcats[0] = corerecs.category+"/"+corerecs.subcategory;
//in the core table, the description and resolution fields are //arrays of strings so we have to cycle through them and put them //together to get our question and answer fields' values //respectively.

Related topics

Knowledge Management migration