Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Created by NigamGoyal on 3/11/2019.
*/
public with sharing class AccountController {
@AuraEnabled(cacheable=true)
public static List<Account> getAccountRecordWithRelatedContactList(Id recordId) {
List <Account> accountList = new List<Account>();
accountList = [Select Id,(Select Id, FirstName, LastName, Title, Phone, Email FROM Contacts) from Account WHERE Id = :recordId];
return accountList;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.