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?

1
  • please share your code - we can then easily see where the problem is Commented Jul 9, 2017 at 6:28

2 Answers 2

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/

1
  • Lightningstrike.io has some good components as well
    – Eric
    Commented Jul 10, 2017 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .