Skip to main content

I have the following objects:

  • X__c (Master-Detail )
  • Y__c (Master-Detail )
  • XY__c (Junction object between X and Y)
  • Additionally, I have another object that stores Zone__c and Region__c.
  • On the User object, I also have Zone__c and Region__c fields.
  • On the Y__c object, I also store Zone__c and Region__c values, but X__c does not have Zone or Region fields.

My role hierarchy is designed as follows:

  • Zone level → Branch Manager (e.g., Central, Northern, Southern, Eastern)
  • Region level → 4 states grouped under each zone

The challenge is: 

 šŸ‘‰ I need to share

X__c records with users based on their Zone and Region, but since X__c has no direct Zone/Region field

, I’m not sure how best to set this up. 

Questions:

  1. What are the best practices to implement record sharing for this scenario?
  2. Should I denormalize data (e.g., copy Zone/Region from Y__c to X__c via automation) or rely on junction object relationships for sharing?
  3. Is Apex Sharing a better option here compared to OWD + Sharing Rules?
  4. How do I align this with the role hierarchy for secure but efficient access?
1 answer
0/9000