Showing a error when i am trying to access account lookup.

enter image description here

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

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

2 Answers 2


[EDIT] You can use reuse Strike components, just copy code to your Salesforce and it is ready to use.



The default Salesforce components do not support lookup, you have to build your custom component. However you can reuse code from here, I used it too, 100% working:


Here is official article by Salesforce: https://developer.salesforce.com/blogs/developer-relations/2015/06/salesforce-lightning-inputlookup-missing-component.html

Salesforce Spring ’15 release brought some brand new components ready to be used in your lightning apps. One of the missing components that could be useful for your apps is the input lookup component.

Another resource testifying this: https://developer.salesforce.com/forums/?id=9060G000000XZmuQAG

  • I don't want to use any custom lookup.
    – Tariq
    Jun 6, 2017 at 9:59
  • Please see my edits. It looks there is no other way for now. Jun 6, 2017 at 10:05

@Tariq As of now you don't have any other option than to create your own lightning component for input Lookup.

I have created one for my business purpose. Here is the link to it:


Other than that you can also use a ALJS a third party library for input Lookup as well.

You must log in to answer this question.

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