Skip to content

Instantly share code, notes, and snippets.

View index.html
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<link rel="stylesheet" href="http://cdn.datatables.net/1.10.2/css/jquery.dataTables.min.css"/>
<script src="http://cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
</head>
<table id="dtTable" ">
<thead>
<th>Col1</th>
View gist:d3e3f076030386f7f1727036111f7824
public static List<Account> getMembersForHousehold(Id householdId){
List<Id> contactIds = new List<Id>();
//collect contactIds (persons) from ACRs
for(AccountContactRelation acr : [SELECT ContactId FROM AccountContactRelation
WHERE AccountId = :householdId
AND Account.RecordTypeId =: myAccountHousholedRecordId]){
contactIds.add(acr.ContactId);
}
//collect accountId from contact