Lookup field with option to create new record in Custom Lightning Component

Lookup field with option to create new record in Custom Lightning Component

Sample Code:

<aura:component implements=”force:appHostable” >

     <aura:attribute name=”oppty” 
                    type=”Opportunity” 
                    default=”{ ‘sobjectType’: ‘Opportunity’}”/>
    
    <div class=”slds-box slds-theme_default”>
        Account : <force:inputField value=”{!v.oppty.AccountId}”/>
    </div>
    

</aura:component>


Output:

Leave a Reply