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
DupeNukemDupeNukem 

Sites not displaying any Object Data

I have created a very simple page to simply display a list of Accounts.  I am trying to make this list visible on a Sites page so I can demo some functionality to my team. 

Nothing I've tried yet has allowed me to display any object data, though the page renders fine within SFDC. 

Here's the code for the page.

Code:
<apex:page standardcontroller="account" showheader="true" recordsetvar="accounts">

<apex:form >
          
    <apex:pageblock title="All Accounts">
    
<apex:pageblockTable value="{!accounts}" var="a"> <apex:column value="{!a.Name}"/> <apex:column value="{!a.createddate}"/>
</apex:pageblocktable>
</apex:pageblock> </apex:form> </apex:page>

I have made sure that the Field Level Security is set to "Visible" for these fields.  Also, the Site Page Profile has "Read" Access to the Account object.

Can anyone recommend other things I should be looking at to get this (very simple) page to display? 

Thanks for any ideas!

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent
please take a look at:

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_sosc_access_data.htm

Message Edited by Bulent on 12-29-2008 09:58 AM

All Answers

BulentBulent
Your visualforce page would work for fine authenticated users since it'll use the last used filter.
However, last user filter has no value for the anonymous access.
gireeshzgireeshz
i am having a similar issue.  So, how do I 'authenticate' as a user in my code?

BulentBulent
if you are facing the same issue posted originally then please tae a look at the " Using List Views with Standard List Controllers" section of the Visualforce guide.
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_sosc_access_data.htm

if it's not the same issue then check the sharing for the object. If it's set to private sharing then you would need to create a sharing rule to share the records with the site guest user.

Message Edited by Bulent on 11-26-2008 09:24 AM
joe_armitagejoe_armitage
I am having the same issue, the object is set to public access. Any ideas? 
BulentBulent
please take a look at:

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_sosc_access_data.htm

Message Edited by Bulent on 12-29-2008 09:58 AM
This was selected as the best answer