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
Rabbani sayyed 8Rabbani sayyed 8 

i have a visual force page and have a controller.i want to restrict access to the controller who have access through grant access through hierarchies.how to do it?

PrakashbPrakashb
Hi Rabbani,

Not sure about your requirement of restricting access to the controller.

If you want the security settings like OWD, Sharing, Hierarchy etc to have impact on the records you are fetching in your controller, then you can declare your class as 'with sharing' which will make sure your controller runs based on the org security settings.