lightning:recordEditForm with lookup field

Lightning Component Code:

<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable" >
    
    <lightning:recordEditForm recordId="0031I000008YCvoQAG" objectApiName="Contact">
        <lightning:messages />
        <lightning:inputField fieldName="FirstName" />
        <lightning:inputField fieldName="LastName" />
        <lightning:inputField fieldName="Email" />
        <lightning:inputField fieldName="AccountId" />
        <lightning:button class="slds-m-top_small" variant="brand" type="submit" name="update" label="Update" />
    </lightning:recordEditForm>
    
</aura:component>

Output:


2 comments:

  1. Hi, do you know how to fix accountId field label? It shows "Account ID" instead of "Account Name".

    ReplyDelete
    Replies
    1. As of now, you don't have attribute like label to replace it.

      Delete