Custom Lookup Component in LWC

9:51 PM


Below is a reusable custom lookup component. The standard lookup component usage is advised, but if you need to bypass the current user's sharing and security or you need more flexibility then use this custom approach. This code is adapted from the above reference.



STEP 1:

Create the Apex Class Lookup, and the LWC component customLookup



STEP 2:

Implement the customLookup component created above, as shown in the example below.


2 comments

  1. If I remove limits if displaying records then it shows multiple records in the result which is fine but it dropdown gets disappear due to which I can not scroll all the records which is available in the list. Could you please help?

    ReplyDelete
  2. ETG is a Salesforce Commerce Cloud Implementation Partner. For 20 years, ETG Global Services, Inc. has successfully implemented eCommerce solutions for growth and enterprise clients.

    ReplyDelete