335 views

Symptoms

This article applies when the following symptoms and conditions are present:

  • Requested items are intermittently created with missing values for all/some mandatory variables.
  • Other variables on the requested item have values.
  • Catalog client scripts are used on the catalog item or variable sets.
  • Asynchronous GlideAjax was used in the catalog client scripts to auto-populate fields that are mandatory, or asynchronous GlideAjax are used in the catalog client scripts and response determines if the mandatory flag is set for another variable, or asynchronous GlideAjax are used in the catalog client scripts of the catalog item or variable set.

Release


All Releases

Cause

An asynchronous GlideAjax, "getXLM(<callback function>)" allows the client side to continue to load without waiting for a response from the server; it includes a callback function that processes the GlideAjax response once received. When catalog client scripts on a catalog item or variable set contain asynchronous GlideAjax, users are able to checkout before the response is received, before the mandatory variables are populated, or before the mandatory flag is evaluated based on the result of the response. These scenarios will result in the mandatory variable not containing a value.

Resolution

Because of the nature of asynchronous GlideAjax, add an onSubmit catalog client script to re-evaluate/re-affirm those mandatory variables are not empty during the checkout process. This process also allows extra time for the response from the server to come back. 

Additional Information


For more information about creating the onSubmit catalog client script to verify that a mandatory variable is not empty, see KB0622896.

Article Information

Last Updated:2018-06-21 11:52:19
Published:2018-06-21