Reference field selected from lookup popup not rendering after selection

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
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:
1) Create a new detail page for account
2) Add the "Owner ID" field to the field section "Basics" (you could pick any reference field)
3) Save the page
4) Preview the page picking an existing account
5) Toggle the ownerfield in to edit mode
6) click the magnifying glass
7) remove the default search filter so all results display
8) 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:
1) 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
2) This does not happen if you pick an item from page 1 of the lookup
3) 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).
4) 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.
5) 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>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Thanks for the comprehensive write up.  We will look into the issue. 
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Hi Rob - I just tested this with 6.8.7 and it still appears to be occurring.  Any updates?
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
This has been fixed in dev. And should be available in the next patch release.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Great news, thanks Ben!
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
This should be fixed in the 6.8.8 release.  Let me know how it goes.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Tested with 6.8.8 and confirmed.  Thank you Ben!