171 views

Symptoms


While submitting a record record producer on service portal, the page get stuck with message "Submitting" and page submission never gets completed.

At the time of issue, while looking into the network tab for the submit (POST) request/response or looking into the session debug log revealed below stack,

Evaluator: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String 

Caused by error in sys_ws_operation.....operation_script at line 

39 com.glideapp.servicecatalog.scoped.api.CatalogItemJS.jsFunction_submitProducer(CatalogItemJS.java:426) 

sun.reflect.GeneratedMethodAccessor2085.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) 

org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138) org.mozilla.javascript.FunctionObject.doInvoke

(FunctionObject.java:670) org.mozilla.javascript.FunctionObject.call(FunctionObject.java:614) 

org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2582) org.mozilla.javascript.optimizer.OptRuntime.call1

(OptRuntime.java:32) org.mozilla.javascript.gen.sys_ws_operation_0....._operation_script_3238._c_process_1

(sys_ws_operation......operation_script:39) ..

Release


London.

Cause


There was a UI policy which had a script as below,

g_form.setValue('<checkbox_varibale_name>',false);

As per g_form.setValue API document (https://docs.servicenow.com/bundle/helsinki-application-development/page/script/client-scripts/reference/r_ClntScptAcsVblFldsTskRcrd.html), the parameters should be string values.

However, in the above line of code, boolean value was used and hence it causes type cast issues with new sc catalog item widget. This used to work fine in previous releases. 

Resolution


Make sure the g_from.setValue has only string parameters as per the API documentation. 

Additional Information


Catalog UI Policy

Article Information

Last Updated:2018-10-22 10:05:13
Published:2018-10-07