function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dinesh Kumar 405Dinesh Kumar 405 

How to use Look up field data type in lightning Component ? Can anyone provide syntax for using lookup field

I am creating lightning page for inserting record .In Page , i am using lookup field for inserting .Please anyone provide syntax
Best Answer chosen by Dinesh Kumar 405
sfdcMonkey.comsfdcMonkey.com
Hi Dinesh, there is no standard lookup component available in lightning yet. but with <lightning:inputField> component you can use show lookup in your lightning component.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_inputField.htm?search_text=lookup
else you have need to create custom lookup component
here is the link for custom resuable lookup component :
http://sfdcmonkey.com/2017/07/17/re-usable-custom-lookup/

Hope it will helps you, kinldy let us know if it helps you
Thanks
 

All Answers

sfdcMonkey.comsfdcMonkey.com
Hi Dinesh, there is no standard lookup component available in lightning yet. but with <lightning:inputField> component you can use show lookup in your lightning component.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_inputField.htm?search_text=lookup
else you have need to create custom lookup component
here is the link for custom resuable lookup component :
http://sfdcmonkey.com/2017/07/17/re-usable-custom-lookup/

Hope it will helps you, kinldy let us know if it helps you
Thanks
 
This was selected as the best answer
Dinesh Kumar 405Dinesh Kumar 405
Thanks Piyush .by using <lightning:recordEditForm > i am able to see the lookup field but not able to insert its keep on loading . i have attached the Artifact for your reference . User-added image