View gist:d3e3f076030386f7f1727036111f7824
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |