Skip to content

Instantly share code, notes, and snippets.

@amitkumarRoy
Created July 19, 2018 11:19
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 amitkumarRoy/b05a557326ad4eaba5edb58fd39a39f5 to your computer and use it in GitHub Desktop.
Save amitkumarRoy/b05a557326ad4eaba5edb58fd39a39f5 to your computer and use it in GitHub Desktop.
public class ContactRecordListApex {
/**--------------------
Purpose: get list of contact records
-------------------------**/
@auraEnabled
public static list<Contact> getContacts(String recordId)
{
List<Contact> contactList=[select name, FirstName,LastName,Email,Phone from Contact where accountId=:recordId];
return contactList;
}
@auraEnabled
public static list<contact> updateContacts(list<Contact> contactList )
{
update contactList;
return contactList;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment