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:
how to create Multi select Lookup field with option to create new record in Custom Lightning Component?
ReplyDeleteYou have to create a custom search page so that you can select multiple using check boxes instead of lookup field. You have to use wrapper kinda design.
Deleteclick New account open the new account record page
ReplyDeleteYes. That's how it works. If you want to search for accounts, enter the keyword and click search icon on the right.
Deleteon click New Account is not open the new account record page.....!
DeleteCheck whether you are getting any errors in the Browser Console.
DeleteDrop down is not in correct position on scroll, Please help to fix
ReplyDeleteAdjust the width of the div to double check.
DeleteThanks Mugulan Duraipandian, Found solution by making the parent div position:relative.https://salesforce.stackexchange.com/questions/316175/forceinputfield-lookup-field-with-create-new-record-option
Delete