Skip to main content

I have created a wizard with 3 pages. Page 1 uses a model of set up object. Page 2 uses the model of transaction object.

I implemented a custom delete action button which runs a javascript and uses abandonrow method. The sequence of steps for the problem are, as follows

a)  I delete a row in page 1 using this button,
b) I click a custom mass action button  on page 1 and the records from set up model are still available in page 2 throughh params.

I need to use the params from step 2 to create transaction records, which is creating unwanted records.

As a solution, I tried to add additional action(‘Save Model’) after the javascript script runs but it is creating records in set up object.

Please help.

Kalyan, which version of Skuid are you running?


In Banzai (7.x), there are we have changed Model.prototype.abandonRow() so that the UI will update when you call this method - also there are “bulk” versions now which we recommend using instead if you are trying to abandon multiple rows, e.g. from a Mass Action:


  • abandonRows(rowsArray) — abandon a specific subset of the rows in a Model

  • abandonAllRows() or emptyData() — abandon all rows in the Model

All of these methods update the UI immediately when called, as of Banzai.


EVEN BETTER than this, though, is the fact that as of Banzai the Action Framework now includes Actions that do this “abandon row” behavior:


- Remove all rows in Model (same as abandonAllRows() or emptyData()
- Remove context rows in Model (calls abandonRow() if there’s only one context row, e.g. from a Table Row Action, or abandonRows() on selected rows if called from a Table Mass Action)




Here is the XML for a sample page to use to play around with these capabilities once you’ve got Banzai installed:


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Case">   












New {{Model.labelPlural}}

{{Model.labelPlural}}















Case

Zach,

Thanks for the super fast response!!

Our version is 6.8.17. Using Banzai is not possible at this point.

 I am not sure how else I am going to solve this issue 😞.

Kalyan.


Hi Kalyan,

If you want to force an update of the UI in pre-Banzai, you can call model.notifyEditorsOfDataRefresh() immediately after finishing your abandonRow() call(s).


Mr. Zach,

You  look like a life saver.

It works.

 Thank you!!