2

I am unable to search for lookup objects using lightning:recordEditForm:

<lightning:recordEditForm objectApiName="Contact">
    <lightning:inputField fieldName="Name" />
    <lightning:inputField fieldName="Phone"/>
    <lightning:inputField fieldName="Email" />
   <lightning:inputField fieldName="AccountId" />
</lightning:recordEditForm>

As you can see in the attached image that spinner is continuously loading and I'm unable to search for existing account.

enter image description here

My component is embedded in visualforce page, so that I can use this in lightning and classic both. But unable to fetch lookup records. Is there any workaround for this.

1
  • you supply also recordId or other fields? please show us all of your code Feb 12, 2018 at 8:36

1 Answer 1

0

As stated in the documentation:

The lookup type is supported in Lightning Experience only. When used in the mobile app, the lookup type is rendered as an input text field.

It appears that you're trying to use this in a normal Lightning App. This won't work, as a Lightning App is not the Lightning Experience.

1
  • 1
    well, the OP mentioned that the loading icon is displayed (I've the same issue actually), and it's not a simple input text field. I understand your point, but it looks like a bug Apr 12, 2018 at 15:30

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.