Find your content:

Search form

You are here

Determine if the current user is above the record owner in the role hierarchy

 
Share

I am looking to write a validation rule that prevents everyone from editing a record in a certain status, unless they are above the record owner in the role hierarchy.

So for example here is my fake hierarchy:

Role CEO -> Role Exec -> Role Drone

Once a drone has created a record and saved it as locked, the drone can not longer edit the record.

But the Exec or CEO can edit the record. Is this possible using a validation rule?


Attribution to: Daniel Blackhall

Possible Suggestion/Solution #1

You cannot take away sharing access to the owner of the record, but you can prevent the owner from saving an edited record: $User.Id <> OwnerId where $User is the current user. Everything else is sharing based.


Attribution to: Adam Torman
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4572

My Block Status

My Block Content