Notifications

86 views

Symptoms


Subcategories are not populating correctly on a custom table.

Release


Kingston+

Cause


  • The Subcategory dictionary record on the custom table has the "choice_table" field set to the wrong table.
  • This is causing the custom table to use choices only from the (incorrectly) selected table.

Resolution


  1. Remove this incorrect value from the "choice_table" field.
    1. If the "choice_table" is empty, it will retrieve the choices dynamically.
    2. If the "choice_table" field is incorrectly filled, it will retrieve the choices from the incorrect table.
  2. The "choice_table" field does not appear on the form and editing it from the list will not allow you to select a null value.
  3. Use the following script to pass the null value to the "choice_table" field.
fixSubcategory();
function fixSubcategory() {
    var gr = new GlideRecord('sys_dictionary');
    gr.get(__SYS_ID_OF_SUBCATEGORY__);
    gr.choice_table = '';
    gr.update();
}
 

 

Article Information

Last Updated:2018-06-14 07:12:25
Published:2018-06-14