function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tulasiram chtulasiram ch 

What type of Apex sharing rules will be enforced on extension controller

Case 1: I used Standard Controller with Extension controller . Then what type of Apex sharing rules will be enforced on extensions.
case 2: I used custom controller with Extension controller . Then what type of Apex sharing rules will be enforced on extensions. 
Best Answer chosen by tulasiram ch
tulasiram chtulasiram ch
after searching some references:
StandardController Runs under User Mode only
But 
Custom controller and Extension Controller by default System Mode.
When we use Standard controller with extension controller , the logic from standardcontroller will always be under user mode. But we can change using with sharing key word on extension controller to run under user mode too.

All Answers

Pavit SiddhuPavit Siddhu
Hello, It depends on your controller class type.
tulasiram chtulasiram ch
Ok Pavit Kumar if i used Extension for Standard Controller , which type of Apex Sharing will be enforced. Because we didn't declare any class for standard controller. 
Example: StandardController = "account" then i used extension then what type of sharing rules will be enforced.

Pavit Kumar if you have an answer for my question please give me in brief.
tulasiram chtulasiram ch
after searching some references:
StandardController Runs under User Mode only
But 
Custom controller and Extension Controller by default System Mode.
When we use Standard controller with extension controller , the logic from standardcontroller will always be under user mode. But we can change using with sharing key word on extension controller to run under user mode too.
This was selected as the best answer