Record Access Strategy - ETM vs Programmatic
I am looking for some opinions on the best way to configure row-level access in my salesforce org.
We are a healthcare company using Salesforce as our EMR. We would like to restrict our user's record access based on the state and contract they are assigned
We are contracted across multiple states and those states may have 1 or many contracts active within them.
Members (housed in accounts) can have 1 or many active contracts. Below is a simple schema for our contracts
| USA | USA | USA |
|---|---|---|
| Arizona | New Mexico | Nevada |
| Contract 1 | Contract 3 | Contract 4 |
| Contract 2 | Contract 5 | |
| Contract 6 |
The "assignment rule" is that whenever a child record of the account (called Eligibility__c) is created the account will be added to the group. The eligibility record has a field that denotes which of the above contracts this member is active for
My first thought is to use Enterprise Territory Management as it's tailored towards geographic access rather than roles based. The issue is that the assignment rules for ETM are, from what I can see, field-based (something like, if the account state = Arizona assign them to the Arizona contract)
My use case is a bit more complicated than that as we are using a related child record as the trigger and members can have multiple eligibilities.
My main questions are, should I be using the ETM backbone at all, using the ETM setup to create the groups and assign users but using a trigger to handle the assignment of accounts to those groups? Or should I just use go all code and use programmatic sharing? Is there a better record access strategy that I am not considering based on my requirements?
Posted Jan 4, 2023, 6:06 PM UTC