This one is rather difficult to explain, so I’ll defer to steps to reproduce and sample page for the details. In short, in certain situations, a reference field value is not being rendered properly after selecting from the lookup popup window.
Steps to reproduce:
- Create a new detail page for account
- Add the “Owner ID” field to the field section “Basics” (you could pick any reference field)
- Save the page
- Preview the page picking an existing account
- Toggle the ownerfield in to edit mode
- click the magnifying glass
- remove the default search filter so all results display
- Go to any page other than page 1 and select a value by clicking the “link icon” - The problem does not happen if you choose an item from page 1
Actual Result
Lookup closes but the Owner ID field shows the old value
Expected Result
Lookup closes and Owner ID displays the new value
A few notes:
- The OwnerId and Owner fields in the data row (skuid.$M(‘Account’).getFirstRow()) contain the correct values, it’s just that the ui is not updated to display the new value
- This does not happen if you pick an item from page 1 of the lookup
- I remember a similar type of issue with reference fields not re-rendering properly after they were updated (this was before the lookup popup was introduced).
- If you remove the value from the field before Step 6, the result is the same - after selecting a new value, the field displays blank instead of having the new value.
- Reproduced on Chrome 39.0.2171.71 & IE11
Sample Page
<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
<model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
<field id="OwnerId"/>
<field id="Owner.Name"/>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
</conditions>
<actions/>
</model>
</models>
<components>
<basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="read">
<columns>
<column width="100%">
<sections>
<section title="Basics" collapsible="no">
<fields>
<field id="Name"/>
<field id="OwnerId"/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
</skuidpage>