Skip to content

Instantly share code, notes, and snippets.

@forcethesales
Created March 15, 2018 15:13
Show Gist options
  • Save forcethesales/6c287029caee8d2d67d5ab555a7c2624 to your computer and use it in GitHub Desktop.
Save forcethesales/6c287029caee8d2d67d5ab555a7c2624 to your computer and use it in GitHub Desktop.
Visualforce Page Donor Profile
//Accessed with Custom button on the Account object on the Household details page layout.
<apex:page standardController="Account" sidebar="false" lightningStylesheets="true" showHeader="false">
<h1 style="text-align:center;color:blue;">
The {!Account.Name}
</h1>
{!Account.BillingStreet}
{!Account.BillingCity}, {!Account.BillingState} {!Account.BillingPostalCode}
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!Account.contacts}" var="contact" style="border-collapse: collapse" width="700" border="1">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Title}"/>
<apex:column value="{!contact.Phone}"/>
<apex:column value="{!contact.MobilePhone}"/>
<apex:column value="{!contact.npe01__WorkPhone__c}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.DonorNotes__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
<apex:pageBlock title="Gifts">
<apex:pageBlockTable value="{!Account.opportunities}" var="gift">
<apex:column value="{!gift.Name}"/>
<apex:column value="{!gift.closedate}"/>
<apex:column value="{!gift.amount}"/>
<apex:column value="{!gift.Campaign.Name}"/>
<apex:column value="{!gift.Gift_Purpose__c}"/>
<apex:column value="{!gift.Gift_Solicitor__r.Name}"/>
</apex:pageBlockTable>
</apex:pageBlock>
<apex:relatedList subject="{!account}" list="CombinedAttachments" />
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment