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
visulaforcevisulaforce 

Field accessability difference b/w Apex

HI,
I am querying a custom object from S-control and Apex class. I  am able query that object succesfully in Apex class but in  S-control  i m getting a error related to permission. Is thre any difference in field accessabilty b/w Apex n S-control.
hisrinuhisrinu
Hi,

  By default Apex will execute in system mode, so it will not check for the permissions.
  It will execute in system admin mode, even the user can't have access also he/she can see it.
  If you want to implement security constraints please use the with sharing keyword in the header of class.
 
  S-Controls are executed in user mode, so it will check for user permissions.

  Hope this clarified your doubt.