+ Start a Discussion
Krishna Prasad K PKrishna Prasad K P 

Can we restrict the Account access via role hierarchy ONLY for selected scenarios?

We have a functionality where in a particular catogory of people are given explicit access permission on Accounts which obeys certain eligibility criteria, via Apex sharing.


Basically we created a public group for those users and we create AccountShare records on those accounts that need to be shared, using a batch Apex job.


Now,  the issue is, all the users who belong to higher roles than the above mentioned group of people, also get access on the Accounts.  which we dont need to give. So means we need to restrict the role hierarchy based access for the above scenario where we intended to share it with ONLY a particular catogory of people not thier managers or users on higher roles.


Our role structure is well defined and we don't want to change the role hierarchy  or isolate those special group of people from role hierarchy.. So could anybody please suggest a way to tackle this issue and restrict the access for the managers by role hierarchy for this particular scenario... 


Thanks in Advance