2

I Want to prevernt user to access other user cases in search and report as well in salesforce, when user at same level in role hierarchy.

My Organization-Wide Defaults setting is following

Case: Private User: Public Read Only Account, Contract and Asset: Private

Kinldy sugget the way, how can I achieve this.

3

Edit: Based on comments, here's how to find an offending sharing reason. First, go to the case detail page, and click the sharing button:

Case Buttons on Detail Page

Then, click on the Expand List button:

Expand List Button on Sharing Page

Finally, find the user in question and click "Why?" to learn why they have access:

Expanded Sharing View

You'll see a list of reasons why a user has access, such as the following:

Reasons Why A User Can See A Record

You can see that, in this example, a user is an administrator, the owner of the record, and a sharing rule grants access. In order to "hide" this case from the specific user, I would need to remove Modify All Cases (make them a normal user), change ownership, and modify the sharing rule, or move the user to a new role. Your specific case will vary.

For example, it might be because of Implicit sharing (meaning, they own a related record that provides access), or it might be a Role and Subordinate rule, possibly on a related record, etc. An exhaustive list isn't really going to help you here. You need to read the sharing, understand why, then take the appropriate action to reverse the problem.


Sharing is cumulative, which means you'll have to take the opposite approach: set your OWD to Private, then build sharing rules so that people who need to see each other cases are in the same groups. If everyone except that one user needs to see each others' cases, you'll most likely want to move the lone user to a role all their own that is a sibling of the existing role, and set up the sharing rule to include that single user (if necessary) for the original role.

In other words:

- Parent Role
  |
  +- Original Role
  |
  +- Isolated Role

With a sharing rule as follows:

Members of Roles and Subordinates Parent Role shares with Original Role.

This sort of sharing change is bound to have lots of side effects, so make sure you check very carefully before deploying this to your org. In fact, I'd simulate it in a sandbox first, and test as various users and profiles in various roles to make sure nothing seems amiss.

  • Hi, My Organization-Wide Defaults setting for case is already Private and I want to hide cases owned by one user from other users in search and report as well, when all the user are at same level in role hierarchy. Kinldy suggest – Krishan Gopal Sep 26 '15 at 6:19
  • @KrishanGopal I mis-read your question slightly (since OWD is already Private for cases), but my answer is still mostly valid. Sharing has many aspects, and it only takes one rule to grant visibility. If you have role-based sharing rules, you cannot hide those cases without moving the user to a new role. It's easy to accidentally share a record, and it's hard to intentionally hide a record. – sfdcfox Sep 26 '15 at 6:29
  • Sir: I ahve no sharing rule for case and both the user having different roles but they are at same level in role hierachy. – Krishan Gopal Sep 26 '15 at 6:38
  • @KrishanGopal You'll need to examine a specific case, then, and see what the system tells you. Go to a case that the user can see, but you're trying to make it so they cannot see, and click the Sharing button, then expand the list, find the user that can see the case they shouldn't, and click "Why?" The system will give you a reason why the user has been allowed access. From there, you'll need to remove that reason. It might be by manual sharing, account sharing rules, etc. – sfdcfox Sep 26 '15 at 6:42
  • 1
    @KrishanGopal You're welcome. I did update this answer with some pictures for future visitors as well. – sfdcfox Sep 26 '15 at 6:58

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.