4

In Salesforce by role hierarchy we can manage data access, but by role hierarchy anyone having the same role has access to peers reporting user data. So how to handle scenario where Manager (Role as Team Lead) should see only his reporting users (Role as Developer) data and no other managers reporting users data?

Eg. John and Mike are Team leads. Jack's (Developer) manager is John and Elena's (Developer) manager is Mike. Now I want that records created by Jack should be only accessible to John and not Mike. Since having same role to John and Mike as Team Lead gives ability to see any others subordinates data.

  • 2
    That should not be the case by default. Otherwise John and Elena would be able to see each other's records as well. By default people on same level cannot see each other's records in a private model – Eric Dec 13 '15 at 16:07
  • @Eric Thanks for reply. Yes that is true but here since Jhon and Mike have the same role which is in this case Team Lead so they are able to see any one's subordinates data. In my example I want that John should not be able to see records created by Elena since he is not her manager. He should be able to see only John's record. Is this possible without creating separate roles for John, Mike, Jack and Elena and managing their reporting via roles? I don't want to create role for every user in the system. – Kiran Machhewar Dec 13 '15 at 17:36
  • No you have to create separate roles. Say team lead Ohio and team lead New York. Which is good practice anyway since the teams are independent – Eric Dec 13 '15 at 17:37
  • @Eric I have used manager field from the user to indicate John is manager of Jack and Mike is manager of Elena. I came to know that manager field does not play role in data accessibility. Am I correct here or am I missing something here. – Kiran Machhewar Dec 13 '15 at 17:41
  • see help.salesforce.com/… for discussion on Manager field and access – cropredy Dec 13 '15 at 18:09
0

Here was the solution that I went with:

I started creating roles on the fly based on changes in manager field. So if the manager changes then the role of the user will start pointing to new users manager role. That was the solution I implemented, not neat but didn't find anything better than that. So everytime when there were changes in manager, we used to start a batch which used to align the roles.

You can many be use queueable/future for deltas.

0

This is a very old question, but I think Starting from Spring 15, you can handle it using standard Salesforce using Manager groups.

The role hierarchy controls the level of visibility that users have into your organization’s data. With Spring ’15, you can use manager groups to share records with your management chain, instead of all managers in the same role based on the role hierarchy. Manager groups can be used wherever other groups are used, such as in a manual share or sharing rule. But they cannot be added to other groups and don’t include portal users.

enter image description here

As we can see from digram, only line managers have acces to their subordinate data and not peer data.

Src: https://help.salesforce.com/articleView?id=users_managers_only.htm&type=5

Src: https://kapilmohitkar.blogspot.com/2016/01/salesforce-manager-group.html

  • I think I had explored this option, limitation was such groups can be used in sharing rules and it would be maintainance to create such sharing rules. Also manager could change then we need to update the sharing rules. – Kiran Machhewar Jan 14 '19 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.