We have a Skuid page- Page1 - with a Save button, which saves a parent object record and related child records created on the page. There are a sequence of actions associated to this button.
Approach 1
- Saves parent records
- Runs Snippet1 on child records, updates certain fields on the rows in the model
- Save child records
Redirect to the parent detail page
- Step 1
- Step 2. A save() method on the end of Snippet1 saves the child records here. (Step 3)
- Step 4
- Step 1
- Step 2, only in this case both Step 3 and Step 4 were appended as JS in the Snippet1.
Now, Approach 1 was used in an unrelated page - Page2 , but never encountered this problem. But then again, the latter page has relatively lower complexity in calculations in snippets and lesser records to save.
Q1. What is the behaviour of execution (sync/async) when Approach 2 or 3 is used, and how is it different from Approach 1?
Q2. The problem was not encountered in the Page2, what could be the reason for this - complexity? data volume? Is there a “potential danger” in the Page2 in that case?