• Tom Sullivan (Sully)
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Centare

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
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
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
I'm using the lightning tree component and I'm trying to dynamically select an item after Init through an event and want all parent nodes expanded. I have a separte lighting component that the user selects and item and then an event is passed to my component with the Tree containing the Tree Node Name I want to select. This is all working fine but I can't get the lighting:tree component to work.

The expanded issue:
My java script code works to the point of setting all the expanded=true flags for all parent items of the item I want selected but it never renders the children. I can see the expanded icon changed but none of the children are rendered. If I expand everything in the Init handler it displays the tree correctly but on the event java script to change the selected item it just changes the expanded icon and all text is the same.

The Selection Issue: I'm not sure how to select an Item in the tree or what java script I need to make this happen. Any help would be appreciated.