Notifications

87 views

Description

When submitting / ordering a catalog item in Service Portal the page is stuck at "Submitting...".

This is due to the catalog clients scripts and/or catalog UI policies on the catalog item that use g_form.setValue() function but the second parameter for the function is not wrapped in quotes.

For example:

g_form.setValue("short_description", abc);

Instead of:

g_form.setValue("short_description", "abc");

 

Please note that there is another issue with similar symptom but the cause is different. If the resolution on this does not apply please visit the following knowledge article to see if that one applies:

KB0684628

Steps to Reproduce

1) Create a new catalog item

2) Create one variable for it of type Checkbox

3) Create an onLoad catalog client script for this item with the following code:

function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setValue("name_of_the_variable", true);

}

4) Now open this catalog item in Service Portal and click "Order Now"

5) See now that the item won't submit and will be stuck at "Submitting..."

-->If the browser's console is opened the following error message is observed:

Workaround

This is an expected platform behavior now that the second parameter of the g_form.setValue() function must be wrapped in quotes for its functionality to work correctly in Service Portal. This applies to all variable types.

For example, even for a boolean type (i.e. Checkbox) the parameter must be wrapped in quotes.

Example: g_form.setValue("checkbox_variable", "true") and NOT g_form.setValue("checkbox_variable", true);

 

The resolution on this would be to review all catalog client scripts and UI policies (including the ones in variable sets) for any catalog items that have this behavior and adjust them accordingly.


Related Problem: PRB1304542

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-03-07 06:38:33
Published:2019-01-21