How to create custom lookup on custom object in lightning component

Hey guys, today in this post we are going to learn about how to create custom lookup on custom object and submit the lookup value into database in lightning component.
What is lookup relationship in Salesforce?
Lookup relationship communicate between two objects. First known as Parent Object and Second Known as Child Object.
It is always created on child object. Some time we are working on child object and need to fetch the value of parent object.
In this case we need to create a lookup relationship. It will help to fetch the value of parent object.
Lookup relationship field does not required. If parent record deleted then it’s associated child record does not deleted.
We used the files in this example:-
Final Output

Other related post that would you like to learn
Note:- Custom sObject >> NewStudent__c
You need to change my custom sObject name with your custom sObject name.
Lightning Component [myCustomLookupCmp.cmp]
JS Controller [myCustomLookupCmpController.js]
Componrnt CSS [myCustomLookupCmp.css]
Apex Class [myLookupController.apxc]
Note:-Static resource zip file
You need to change $Resource.SLDS2016 with your SLDS zip file name (static resource zip file Name)
Originally published at https://www.w3web.net on July 23, 2020.