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
Francisco Corona 7Francisco Corona 7 

Hello, does anyone know how to use a lightning input lookup tag in a component? I have seen various articles online but they mainly reference the object but i want the component to reference a lookup field in my custom object. Thank you

Akash KainturaAkash Kaintura

hey here is how you can use the  lightning: input with the help of Lightning Data Service 

 example :
<lightning:recordEditForm onsuccess="{!c.handleSuccess}"
                                  objectApiName="Lead"
                                  onsubmit="{!c.handleSubmit}"    >
            
            <lightning:messages />
            <div class="slds-grid slds-grid slds-gutters">
                <div class="slds-col ">
                    
                    <lightning:inputField fieldName="Name" /> ----> you can use  the field name here whether its lookup or custom.