• Sameer
  • 0 Points
  • Member since 2011

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0


I have one user who has CRUD permission on Case & Read only permission on Custom Object.

When Case record is created ,in Apex class invoked through trigger user is able  to create record for custom object on which user does not have create permission. The Apex class is written using Sharing keyword.

The code in Apex class seems to run in system mode even using after sharing keyword.

Please let me know if is possible to write Apex class which obeys FLS and Object permissions.


Documentation says Apex runs in system mode and standard controller runs in user mode. If we click on save button on Case layout then how both these 2 works together? Because std. Controller runs in user mode then the trigger runs in system mode.

Please can someone clarify this?

  • February 28, 2011
  • Like
  • 0