Using "g_form.setValue('variable_name', boolean)" in Order Guide caused Failing Widget 'SC Order Guide' error in 'Choose Options' section.

This issue is only reproducible in Kingston.


Steps to reproduce:

  1. Create an Order Guide.
  2. Create a Catalog UI Policy or Catalog Client Script which contains "g_form('variable_name', boolean)", variable is Check Box Type.
  3. Add some Order Guide Item to this Order Guide.
  4. Try this Order Guide on Service Portal.
  5. Trigger the "g_form.setValue('variable_name', boolean)" function in 'Describe Needs' Section.
  6. Click on the 'Next' button.

There are several errors popup(c1.jpg).

  1. java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
  2. Failing Widget 'SC Order Guide'(480ca054db03320064301150f0b8f545)
  3. Error messages in Console log of the browser 'TypeError: Cannot read property 'length' of undefined'

These errors are all caused by "g_form.setValue('variable_name', boolean)". It causes errors in the Server Scripts of the 'SC Order Guide' which looks like the Widget is broken.

Additional Information

This is caused by problem PRB1290254.

The workaround is using "g_form.setValue('variable_name', String)" instead of 'g_form.setValue('variable_name', boolean)'.

Article Information

Last Updated:2019-08-02 20:46:43