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:
<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:
Hi, do you know how to fix accountId field label? It shows "Account ID" instead of "Account Name".
ReplyDeleteAs of now, you don't have attribute like label to replace it.
Deleteany luck with the label
DeleteStill not supported. Create an idea in Salesforce Idea community.
DeleteCan we use visualforce page to have the lightning input look up field?
ReplyDeleteYou can Use Lightning Components in Visualforce Page. Chec this https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm
Delete