Using HEDA Affiliations to Trigger Workflows and Processes and Manage
Security
Kyle Schmid
Senior Salesforce Developer, Huron Consulting Group
Initial Inspiration
The Problem: Controlling access to Contacts at the UT Austin McCombs School of Business
• Users from various departments in a single org
• Users should only see contacts that have an Affiliation with their department
The Solution: Utilize the existence of Affiliation records to control access, but how?
• Define an Affiliation “Template” object
• Define Criteria-Based Sharing Rules
• Use the Affiliation Template records to activate the sharing rules
Where did this idea come from?
Implementation
Affiliation Template Object
• Same fields as the Affiliation object
• Allows us to define a model, or “Template” of an Affiliation
Triggers
• On Affiliation Template
• Check or uncheck a checkbox on Contact/Related Account whenever a Template is created, changed, or deleted
• On Affiliation
• Check or uncheck a checkbox on Contact/Related Account whenever an Affiliation is created, changed, or deleted
Security Rule
• Share will a group of users based on checkbox field
How do we make this happen?
Open-Source on GitHub
• https://github.com/kyleschmid
/AffiliationTemplates
Final ProductWhat does this solution look like?
Step-by-Step
1. Install Affiliation Templates in your org
• Instructions can be found in the README on GitHub
2. Create a checkbox field on Contact or Account
3. Create an Affiliation Template record
• Put the API name of your checkbox in the Field Name field here
4. Create a Sharing Rule
• Base the rule on your checkbox
5. Enjoy!
So how easy is it?
Other Uses
Once we bubble Affiliations up to a field on Contact, a realm of possibilities open up:
• Aggregation: All contacts with an Affiliation to a sports team should have the Student Athlete checkbox
checked
• List Views: All Student Athletes
• Reports: All Student Athletes with a 3.0 or greater GPA
• Dashboards: Chart all Student Athletes’ GPAs
• Workflows: Update an “At-Risk” field when a Student Athlete falls below a 2.5 GPA
• Process Flows: Create a Case when a Student Athlete falls below a 2.5 GPA
But wait, this can be used for more than just security, right?
Demo
Questions?
Thank You!