Skip to content

Instantly share code, notes, and snippets.

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
<!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>