I’ve been experimenting with the new lightning:inputfield and it seems that the lookup fields don’t work in the mobile app or in Lightning Components which have been embedded in VF pages. Can people confirm if that is the case?

If so, does anybody know if there are plans to make them work in those environments? There not a danger that Salesforce is making migration pathways to Lightning Experience that much harder for larger organisations with complex/slow migration plans? It seems that the option is either to:

  • Develop functionality twice (as both VF pages and Lightning Components) so that the use case can work in either environment during the migration
  • Develop VF pages to embed in lightning experience (which has all sorts of issues with passing data out of the VF controllers to the pages they’re embedded in, etc.)

It would be good to understand whether this is a thing we can wait for, or will need to consider as part of an eventual migration strategy.

For completeness, here is the simple component I've been able to get working in Lightning Experience:

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >

<lightning:card title="Managing Escalations" iconName="custom:custom76">

    <lightning:recordEditForm aura:id="recordViewForm"
        <lightning:inputField fieldName="Escalation_Approver_Primary__c"/>
        <lightning:inputField fieldName="Escalation_Approver_Secondary__c"/>
        <lightning:inputField fieldName="Escalation_Approver_Tertiary__c"/>



The lookups will auto-complete, etc. in Lightning Experience. However, when this component is embedded in a VF page, the auto-complete dropdowns don't populate and you get a constant loading spinner on the right-hand side.

1 Answer 1


It doesn't work for me at all, not even in the browser -- no lookup window or auto-complete action occurs in an aura:component. Does it work for you in the browser? If so, would you mind posting a code snippet?

I don't know where this functionality stands on the roadmap. Here's an Idea to vote on: https://success.salesforce.com/ideaView?id=08730000000Dom1AAC

You could try the free Appiphony Strike lookup component here: http://www.lightningstrike.io/

This works pretty well except there's no onChange attribute so you can't use it to control dependent components, for example.

There are other lookup components written by individual developers, but I haven't tried all of them yet with regards to the onChange functionality. Here's a few that I found.

http://www.jitendrazaa.com/blog/salesforce/lookup-component-in-salesforce-lightning/ http://blog.lkatney.com/2017/02/15/lightning-component-for-lookup/ http://sfdcmonkey.com/2017/07/17/re-usable-custom-lookup/

  • Sure thing - I've added the code sample. Thank you for the response. We've looked at the Lightningstrike components, but as they don't automatically include all of the filters/dependencies, etc. I was hoping for something out-of-the-box.
    – Bigears
    Commented Mar 2, 2018 at 12:46

You must log in to answer this question.

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