0

I followed these steps to create a lookup field that works well in the Lightning App Preview. However, if I try to add this component to a page, the lookup field is no longer rendered at all.

<aura:attribute name="contact" type="Contact" 
               default="{ 'sobjectType': 'Contact' }" access = "public"/>

<force:inputField aura:id="accountid" 
                 value="{!v.contact.AccountId}"/>

Any ideas on why this would be happening?

  • please share your code - we can then easily see where the problem is – Itai Shmida Jul 9 '17 at 6:28
0

Just using this method instead. More work is involved but we get more control over the component in the end.

https://meltedwires.com/2015/10/27/salesforce-lightning-lookup-component/

  • Lightningstrike.io has some good components as well – Eric Jul 10 '17 at 19:15
0

I would recommend you to use this as an example to create a lookup. I implemented this a few weeks ago and works really good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.