Model save marked with rollbackOnError does not roll back new rows marked for delete

  • 1
  • Problem
  • Updated 3 years ago
  • Acknowledged
  • (Edited)
When a new row has been created in a model and is marked for deletion, if the "save" fails, the row is removed from the model.

Steps to Reproduce:
1) Add a validation rule to Account where Name = "Test123" (don't allow accounts with name of "Test123"
2) Create Tab page for Account
3) Mark "Save" button to "rollbackOnError=true"
4) Add new row to table with Name of "TestABC"
5) Add new row to table with Name of "Test123"
6) Mark row "TestABC" for delete
7) Click Save

Expected Behavior
Both rows remain in model/table due to validation error that occurs on "Test123" row

Actual Behavior
"TestABC" row removed from model/table

Analysis
removeRowById is called prior to remote save operation occurring.

Sample Page XML
<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="100" query="true" createrowifnonefound="false" sobject="Account">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
   </models>
   <components>
      <pagetitle model="Account">
         <maintitle>
            <template>{{Model.labelPlural}}</template>
         </maintitle>
         <subtitle>
            <template>Home</template>
         </subtitle>
         <actions>
            <action type="savecancel" rollbackonanyerror="true"/>
         </actions>
      </pagetitle>
      <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Account" mode="read">
         <fields>
            <field id="Name" allowordering="true"/>
            <field id="CreatedDate" allowordering="true"/>
         </fields>
         <rowactions>
            <action type="edit"/>
            <action type="delete"/>
         </rowactions>
         <massactions usefirstitemasdefault="true">
            <action type="massupdate"/>
            <action type="massdelete"/>
         </massactions>
         <views>
            <view type="standard"/>
         </views>
      </skootable>
   </components>
   <resources>
      <labels/>
      <css/>
      <javascript/>
   </resources>
</skuidpage>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Barry, this is acknowledged, we've added it to our backlog.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks Zach!
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
This appears to be resolved as of Skuid 7.24.  Thank you!