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
sfdeveloper9sfdeveloper9 

Transfer records to only users below in the role hierarchy

Is there a way to restrict the ownership transfer to only users in role below the current user role in the role hierarchy.

Ex: I have below  Roles :

 

Dept A Manager

            Dept A subordinate

Dept B Manager

            Dept B Subordinate.

 

users with Dept A manager role should only be able to transfer a record to any user with Dept A subordinate role

users with Dept B manager role should only be able to transfer a record to any user with Dept B subordinate role

 

Thanks in advance.

sfdcfoxsfdcfox

Strictly speaking, no. Any user that is active and has at least Read access to the entity (not to that specific record, just the entity itself) may be the owner of a record. In theory, you could create a trigger to restrict access, but such an exercise may be more trouble than it would be worth.