Defect/Issue Description:
If field is updated by model action then model.cancel() doesn’t cancel all changes
Environment:
- API Version: v2
- Release: Chicago
- Release version: 14.4.11
- Platform: Salesforce
Action Performed:
Using the XML provided, open it as a user.
- Save model changes (table should have 1 empty row)
- Enter ‘aaaa’ in Field1
- notice Field2 is updated by Model action to contain ‘test’
- Press the cancel button once.
Expected Result:
All changes (including Field2) to be cancelled/cleaned, so user can go to the last saved state of the model.
Actual Result:
Changes in Field2 are not cancelled, user has to press cancel button again.
Additional Resources:
<skuid__page unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
<models>
<model id="UiModel" limit="20" query="true" datasource="Ui-Only" createrowifnonefound="true">
<fields>
<field id="Field1" displaytype="TEXT" length="255" label="Field1"/>
<field id="Field2" displaytype="TEXT" length="255"/>
</fields>
<conditions/>
<actions>
<action>
<actions>
<action type="updateRow" fieldmodel="UiModel" affectedrows="context">
<updates>
<update valuesource="fieldvalue" field="Field2" enclosevalueinquotes="true" value="test"/>
</updates>
</action>
</actions>
<events>
<event>row.updated</event>
</events>
<fields>
<field>Field1</field>
</fields>
</action>
</actions>
</model>
</models>
<components>
<skuid__table allowColumnFreezing="dragDrop" model="UiModel" uniqueid="sk-1O50-15088" mode="edit" showSaveCancel="true" pageSize="10" enableDrawers="false">
<fields>
<field id="Field1" label="{{Field1}}" uniqueid="fi-1O56-16788"/>
<field id="Field2" uniqueid="fi-1O7y-20867"/>
</fields>
<filtering enableSearch="false"/>
<actions/>
<rowActions/>
<massActions/>
<exportProperties useTableColumns="true"/>
<sorting enable="false"/>
<drawer>
<components>
<skuid__table allowColumnFreezing="dragDrop" model="UiModel" uniqueid="sk-1O5O-21408" mode="read" showSaveCancel="false">
<fields>
<field id="Field1" label="{{Field1}}" uniqueid="fi-1O6c-11473"/>
<field id="Field2" uniqueid="fi-1O6f-12447"/>
</fields>
<filtering enableSearch="false"/>
<actions/>
<rowActions/>
<massActions/>
<exportProperties useTableColumns="true"/>
<sorting enable="false"/>
</skuid__table>
</components>
</drawer>
</skuid__table>
</components>
<resources>
<labels/>
<javascript/>
<css/>
<actionsequences/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuid__page>