Skip to content

Instantly share code, notes, and snippets.

@ketan-benegal
Created March 18, 2019 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ketan-benegal/6d50ab3a62e52d327f088664093b02d1 to your computer and use it in GitHub Desktop.
Save ketan-benegal/6d50ab3a62e52d327f088664093b02d1 to your computer and use it in GitHub Desktop.
public class ContactController {
public List<Contact> contactList {get;set;}
public ContactController(){
this.contactList = new List<Contact>();
}
@AuraEnabled(cacheable=true)
public static list<Contact> getContacts(string searchKey){
List<Contact> lst = new List<Contact>([SELECT Id, Name, Title, Phone, Email FROM Contact WHERE Accountid = :searchKey ]);
return lst;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment