Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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

1 Answer 1

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 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 at 14:03

Your Answer

 
discard

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.