Fix a form from freezing when submitting a catalog item in Service PortalIssue On Service Portal, when submitting a catalog item, the form freezes and the record is not created. Additionally, a console error displays stating '500 (Internal Server Error)'. Expanding the returned JSON objecting in the console reveals the following information under the data key: message: "java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.StringCauseThe cause may be from a catalog client script setting a JavaScript number type in a string variable field. For example, performing math operations could return a JavaScript number type, not a JavaScript string type. var num = 5 * 9; // returns a variable type Numberg_form.setValue('string_type_variable', num); // erroneously setting a string field type with a Number type variableResolutionTo resolve this, use toString() method to convert the variable to a string type before using the same variable to populate a string field, as shown in this example: var num = 5 * 9;var str = num.toString();g_form.setValue('string_type_variable', str);