Below are some of the examples of how you can invoke the component:
1. Fetching Account Records with Name-
<c:AutoComplete aura:id=”account-records” label=”Account” objectApiName=”Account” idFieldApiName=”Id” valueFieldApiName=”Name” />
2. Fetching Opportunity Records with Name having Amount>1000 –
<c:AutoComplete aura:id=”opp-record” label=”Opportunity” objectApiName=”Opportunity” idFieldApiName=”Id” valueFieldApiName=”Name” extendedWhereClause=”AND Amount>1000″/>
3. Fetching record from custom object “Car__c”, here Id field is a custom field “Car_External_Id__c”, value field is standard “Name” field, max record fetched can be 20 –
<c:AutoComplete aura:id=”car-record” label=”Car” objectApiName=”Car__c” idFieldApiName=”Car_External_Id__c” valueFieldApiName=”Name” maxRecords=”10″/>
raj
14 May 2019The repo doesn’t have the server side APEX controller (e.g. for component.get(“c.getRecords”);). May be useful to folks leaning to include this also in the repo.
Manish Choudhari
14 May 2019Oops, forgot to add those. Thanks for notifying me. I have added the files now.
dinesh
15 May 2019Great!!! Nice one
Ranjeeth
16 May 2019can you help to guide on how to become salesforce consultant? I don’t have a programming background. Are there any pathways?
sai prakash
17 Sep 2019hai, i am unable to find the apex controller
Manish Choudhari
4 Oct 2019This is the location of apex controller:
https://github.com/choudharymanish8585/AutoComplete-Lightning-Component/blob/master/AutoComplete/AutoCompleteController.cls
Varun
16 Dec 2019Do we have similar thing implemented using lightning web components?
David Rasmussen
19 Dec 2019This was a helpful example. Thank you!