1

Is there a Lookup field renderer available in Lightning? Something like ui:LookupField. I am looking for something that will have the ability to search for a record. In Salesforce1, you get a popup where you can serach for the record that you want, and then select it. Is there anything like that available for Lightning? How is a user supposed to select a specific parent Account for example?

EDIT:

There is a component called "force:inputField" which I assume is supposed to have this functionality. Has anyone got it to work? I keep getting an Internal Server Error.

Moshe Karmel
  • 830
  • 1
  • 7
  • 13
  • It's been 9 months since this was asked... http://salesforce.stackexchange.com/questions/64580/lightning-how-to-use-forceinputfield – Moshe Karmel Sep 10 '15 at 21:14
  • Haven't tried it but found this... https://developer.salesforce.com/blogs/developer-relations/2015/06/salesforce-lightning-inputlookup-missing-component.html – Jenny B Sep 10 '15 at 22:12

1 Answers1

4

Apparently there are no known cases of force:inputField working correctly. @Fab asked this question 9 months ago, and noone seems to have been able to get it working. I guess for now the best option is, like @Mohith suggested here and @Jenny commented above, to create your own lookup component.

https://developer.salesforce.com/blogs/developer-relations/2015/06/salesforce-lightning-inputlookup-missing-component.html

I hope this will be fixed and working asap, as it's pretty hard to have users create sObjects without it.

EDIT

As @Peter posted on the thread linked above, there is currently a limitation in force:inputField's that you are required to add a default attribute like so:

default="{ sobjectType: 'Account' }"
Moshe Karmel
  • 830
  • 1
  • 7
  • 13