1

Can we restrict record access from users who are on a higher level in the role hierarchy in salesforce,

through Apex or admin

1

3 Answers 3

0

In Setup > Sharing settings, you can uncheck the "Grant Access Using Hierarchies" checkbox against that object.

enter image description here

3
  • That will remove access for subordinates too.
    – Phil W
    Commented Nov 10, 2021 at 8:24
  • @PhilW 🤔 I think this checkbox is for the users above in the hierarchy. From the doc help.salesforce.com/s/… Commented Nov 10, 2021 at 9:10
  • but it's on object-level sharing, I want to know if we can restrict it on record-level sharing Commented Nov 10, 2021 at 10:49
0

You can uncheck the 'Grant Access Using Hierarchies' in sharing settings, but the point to remember is the impact will be on the object level and not for any specific users.

If you want to control the access to some specific records for some specific users, check the OWD of that object and if it is private/public read only, you can control the access via sharing rules.

1
  • but it's on object-level sharing, I want to know if we can restrict it on record-level sharing Commented Nov 10, 2021 at 10:49
0

Yes, Disabling Grant access using hierarchies checkbox will only possible on custom objects, not for standard objects in Salesforce.

And before Restriction Rules arrives, Salesforce only having the functions to open the record access only like Role hierarchy/Sharing rules. Not for restriction.

So as already phil W mentioned in comment, You can use Restriction Rules which has helping to achieve your requirement.

Please let me know if it helps.

1
  • 1
    Thanks, for the reply i know that, just looking if anything possible which i didnt know but thank u alot , Commented Nov 11, 2021 at 12:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .