I have a visual force page with standard controller (of type standard object) and controller extension.
controller extension for page is of type without sharing.
On this page, I am binding fields from three different custom objects A, B, C through extension.
The profile with which i am accessing page have following accessibility:
- Object A - Read, View All
- Object B - Read, Create, Edit
- Object C - Read, View All
On page on click of one of the command button activity, I am updating record of type B only. But while this activity on visual force page only it is throwing exception
- messages:system.security.NoAccessException: Create access denied for Object A, controller action methods may not execute
- system.security.NoAccessException: Update access denied for Object C, controller action methods may not execute
If controller is of type without sharing then why it is still throwing such exception at page level.
Is there any workaround without updating accessibility or any other way. Please help or provide justification.