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.
- Navigate to System Definition > Dictionary
- Search for Table = kb_knowledge and Column name = number
- Open the record and uncheck Unique field
- If Unique field is not available:
- Right click on Form Header > Configure > Form Layout
- Move the entry Unique from the Available to Selected list.
- 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);
gs.info(count + " index dropped.");