HEDA and NPSP Affiliation Templates for Salesforce
Higher-Ed Data Architecture (HEDA) and Non-Profit Success Pack (NPSP) Affiliation Templates for Salesforce
When we started our Salesforce implementation at the McCombs School of Business (University of Texas at Austin), we found that Contact record sharing amongst various departments around the college was an interesting problem that needed solving. We needed to share and un-share Contact records as our students progressed through the student lifecycle. When the Salesforce Foundation released the Higher-Ed Data Architecture (HEDA), we determined that a security solution based on the Affiliations object would be ideal. We then built a solution that allows admins to define an Affiliation “template” and share a Contact record with a group of users if the Contact had an Affiliation that fit said template.
This repository contains a modified version of the original solution that is less security-focused. Most of the basic functionality is the same, but some of the wording has changed. Additionally, this solution allows checkbox fields to be specified on both the Contact and the Contact’s related Account. It also works with Salesforce.org’s Non-Profit Success Pack (NPSP) in addition to the Higher-Ed Data Architecture (HEDA).
Affiliation Templates is released under the open source BSD license. Contributions (code and otherwise) are welcome and encouraged. You can fork this repository and deploy the unmanaged version of the code into a Salesforce org of your choice.
$ git clone https://github.com/YOUR-USERNAME/AffiliationTemplates.git
sf.username = YOUR_ORG_USERNAME
sf.password = YOUR_ORG_PASSWORD
sf.serverurl = https://login.salesforce.com ##or test.salesforce.com for sandbox environments
sf.maxPoll = 20
Open-source installation of HEDA:
$ cd AffiliationTemplates
$ ant deployHEDAUnmanaged
Managed package installation of HEDA:
$ cd AffiliationTemplates
$ ant deployHEDAManaged
NPSP:
$ cd AffiliationTemplates
$ ant deployNPSP
UTIL_AffiliationTemplate.CreateTriggerHandlers();
$ cd AffiliationTemplates
$ ant undeploy
Once installed, you’ll want to set up your first Affiliation Template. To do so, follow these instructions:
That’s it! Now the checkbox you specified on any Contact or Related Account with an Affiliation matching the template you defined will be checked. This has a variety of uses: