Installation of the Knowledge Management Advanced plugin fails if unique index already exists in article number


Installing the Knowledge Management Advanced plugin fails if a unique index on an article number field already exists. 


Correcting the issue
The following corrective steps needs to be taken as corrective action.
  1. Navigate to System Definition > Dictionary
  2. Search for Table = kb_knowledge and Column name = number
  3. Open the record and uncheck Unique field
  4. If Unique field is not available:
    1. Right click on Form Header > Configure > Form Layout
    2. Move the entry Unique from the Available to Selected list.
    3. Save changes. The Unique field is now visible.

Execute below script to remove index created on article number field and then retry activating the plugin.

var tableName = "kb_knowledge";

var isUniqueIndex = true;

var columnsInIndex = ["number"];

var util = new GlideIndexUtils();

var count = util. dropByExactElementSequence(tableName, isUniqueIndex, columnsInIndex); + " index dropped.");



Article Information

Last Updated:2019-08-02 21:21:35