function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tom Sullivan (Sully)Tom Sullivan (Sully) 

Lightning Record Edit Form - Edit Record with Picklist

I am using the lightning:recordEditForm to display an existing record for editing.  The recordId gets its value from an aura:attribute value.  All the existing fields on the form are defined using lightning:inputField.

When the record is selected for editing (from an Edit row command on a lightning:datatable), the aura:attribute is updated and all the fields on the recordEditForm are populated correctly except the picklist.  The dropdown is populated with the possible values, but the current value is not selected.

I have done research and found items like this:  https://salesforce.stackexchange.com/questions/227486/lighning-record-edit-form-picklist-field, but there is no answer.

Has anyone found a workaround for this?  I don't want to have to query the record using apex to get the selected value; that would defeat the purpose of using recordEditForm.  Thanks in advance for any help.

tom
Tom Sullivan (Sully)Tom Sullivan (Sully)
I also want to mention that the object being edited has no record types, and, if I create a lightning:outputField for the picklist field the correct current value displays.