Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a controller that currently does not specify 'with sharing'. I would like to be able to add these keywords but I don't want it to break on existing users. It's basically an aggregate report. One of the queries, queries for the number of Case the User created (Not current owner). Will they still have access to these cases that they created even if they are no longer the owner? (They do NOT have view all permissions.)

share|improve this question
up vote 6 down vote accepted

It depends on your sharing rules. Can they see the record in the UI? If so, then you should be good. In general, just because you created a record doesn't mean you'll still have access to it after the owner changes. Ownership is the king of sharing and determines most sharing unless you also have criteria based sharing rules in place as well.

share|improve this answer
So, are you saying I need to test each profile individually to see if they would still have access? (There are a few profiles that will be using this controller) – dphil Mar 19 '14 at 13:43
Profiles don't determine sharing. That is done by role hierarchy most of the time. It all depends on how sharing is set up in your org. Each org can be quite different. – Daniel Hoechst Mar 19 '14 at 14:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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