Start a conversation

Running ajax calls in combination with form submit doesn't save the dataslot values.

Overview

In your Aurea Process application running on Savvion Business Manager (SBM) 2015 SP1, your application does the following:

  1. In the onsubmit event, you are creating several ajax submissions and then returns false.
  2. In the final ajax response you are calling the document.forms[0].submit() method to submit the form.

After submitting the form you discover that the dataslot values on the page are not being saved.

Solution

Diagnosis

The call to document.form[0].submit() does not take care of the required pre-form submission tasks which prevent the dataslots values on the page from being saved.

Solution Steps

Prior to calling the document.form[0].submit(), your application will need to call the sbm.utils.onFormSubmit()method.  This method is a pre-submission handler that takes care of saving and setting appropriate values of default fields and dataslots that exist on the form. 

Note: The form_onSubmit event in the studio should not be used if calling the sbm.utils.handleFormSubmit() method. The sbm.utils.handleFormSubmit() calls userValidationJavascript() which then calls the function specified by the form_onSubmit. This would result in an endless loop.

Testing

Once this change is made to your application code, the dataslot values on the page will be saved.

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments