In salesforce is it possible to have few extension controller with sharing whereas some without sharing ???Priority will be given to which extension controller ?
Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks Rahul for sharing the information. One more question for everyone....
we define a VF page and then extend a controller (can be one or many controllers).But can we have a controller extending other controller ? And in the post (https://salesforce.stackexchange.com/questions/
16121/sfdc-understanding-with-sharing-without-sharing-
unspecified-sharing-classes) we have the concept of either extends or
calls. In case we want to have inheritance kind of property we do mention
extends and the parent sharing rule is overwritten . In which case do we
use calls ? is it when particular controller calls other controller ??If
possible could you provide some business scenario?
Thanks !
Ritu Ghosh
- Use the with sharing keywords when declaring a class to enforce the sharing rules that apply to the current user.
- Use the without sharing keywords when declaring a class to ensure that the sharing rules for the current user are not enforced.
- https://salesforce.stackexchange.com/questions/16121/sfdc-understanding-with-sharing-without-sharing-unspecified-sharing-classes
Let us know if it helps.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar