Dear Community Members,
I've defined deferred batchgroups for several entities. After calling the submitChanges method, the success callback is called multiple times for each group where pending changes can be found. This is understandable acccording to the API description: If multiple batchGroups are submitted the handlers will be called for every batchGroup.
My use case is that when the user push a button to execute an action/function import, I call the submitChanges method, so that the pending changes are sent to the backend in advance to the action execution.
After each change has been successfully submitted, and the last success handler was called, I would like to execute finally the function import. Is there a proper nice way to do that, in combination with attachBatchRequestCompleted function or like this? Or simply setting a local variable in first success callback handler and calling after calling the function import, and evaluate in next succes handlers if any called, whether the function import was executed already ?
What I was thinking, how to pack all operation into one request, so that the update and function import operations are executed in a right order in the backend in a single batch request?
Any advice welcome.
Thank you
Attila