I have removed Read and Created access for Lead object for Guest user profile which is for public sites. But controller is in Without sharing mode. Still it is throwing visualforce exception: Read Access denied.

What i know if class is running without sharing, Record will be created by system

1 Answer 1


Note that without sharing is only for skipping the record access check. You will still need to ensure that you provide read access to the object of you are reading the data from projects and edit access if you are modifying it.

Record access is different than the object access and field access for the profile.

Also make sure you do not have an extension controller. The permissions will be inherited with extension controller. Change it to complete custom controller and without sharing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .