function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VSK98VSK98 

How can we share the Account hierarchy records to other users using sharing rules

Hello All,

I have a requirement like below....

I would like to share Account hierarchy (Self Realtionship) records to other users which is not possible in sharing settings...Do we hv any alternate methods to achieve the same.

Account Hierarchy ----> Need to share all child records (multi level childs)

Regards,
VSK98
AnudeepAnudeep (Salesforce Developers) 
Hi VSK98 

Unsure about the exact code but Apex Sharing appears to be the solution

Use this as reference: https://developer.salesforce.com/forums/?id=906F00000008xXNIAY

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm

If this answer is helpful, please mark this as best so that it can help others in the future

Thank You!