I have a VisualForce page that is displayed on a force.com public site and always evaluates a checkbox field on my SObject as false. In the following example, my SObject is Survey__c and my checkbox field is IsActive__c. IsActive__c always return false, regardless of whether the checkbox is actually checked.

<apex:page standardController="Survey__c">

I know the value is actually "true" when the checkbox is checked, as can be seen from a SOQL query, yet it continues to evaluate as false. What am I doing wrong?


  • are you passing record id in url ? – Himanshu Dec 14 '15 at 19:07
  • Yes, I'm passing id in with the value set to the same id used in the SOQL statement from my screenshot. – neoscrib Dec 14 '15 at 19:16
  • update question with DoSurveyExtension code as well. – Himanshu Dec 14 '15 at 19:17
  • @Himanshu, I removed the extension from the question since it isn't applicable and IsActive__c still shows false. – neoscrib Dec 14 '15 at 19:29

I figured out the problem. I found that it's only shows "false" on my public site, but correctly shows true when viewed as a page within Salesforce. To resolve the issue, you have to go into "Public Access Settings" on the Site Details page, then "Object Settings", the object (Survey in my case), and enable read access to the field in question. Thanks for your help everyone!

| improve this answer | |
  • modify the question to mention that this issue is with public website. – Himanshu Dec 14 '15 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.