When the value is “removed/cleared” from a reference/lookup field that did not have a value to begin with, a row.updated event is incorrectly fired. The value was blank and still is blank so no event should be fired.
Steps to reproduce:
- Create page from sample xml below
- preview page
- type a single character (or any amount of characters) in to the Parent Account Id field
- Hit the backspace key (or select text and hit delete) to remove the character(s)
Expected Behavior
row.updated is not fired since the value has not changed
Actual Behavior
Row.updated event is fired - You will see a “Show message” dialog appear
Note - This might have existed prior to Update 7, haven’t tested older version.
Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
<model id="Account" limit="1" query="false" createrowifnonefound="true" sobject="Account" adapter="" type="">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
<field id="ParentId"/>
<field id="Parent.Name"/>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
</conditions>
<actions>
<action>
<actions>
<action type="blockUI" timeout="2000" message="Parent Changed!"/>
</actions>
<events>
<event>row.updated</event>
</events>
<fields>
<field>ParentId</field>
</fields>
</action>
</actions>
</model>
</models>
<components>
<pagetitle model="Account" uniqueid="sk-3F4CDy-70">
<maintitle>
<template>{{Name}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions>
<action type="delete"/>
<action type="clone"/>
<action type="share"/>
<action type="savecancel" window="self"/>
</actions>
</pagetitle>
<basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="edit" uniqueid="sk-3F4CDy-71" buttonposition="">
<columns>
<column width="50%">
<sections>
<section title="Basics" collapsible="no">
<fields>
<field id="Name"/>
<field id="ParentId"/>
</fields>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section title="System Info">
<fields>
<field id="CreatedDate"/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>