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
Jonathan Vance 5Jonathan Vance 5 

Why do all fields display for my custom object when I preview from Developer Console but not when I visit the Site?

When I launch my home page from the Developer Console Preview, I can see all the fields on my custom object on all 3 of my site's linked pages; however, when I navigate to the url to see the public Site, only 2 of my 3 pages display field data from my custom object.

I went to Setup->Build->Develop->Sites and clicked on the Site Label for the site in question. From there I clicked the Public Access Settings button, scrolled down to the Field Level Security -> Custom Field Level Security area and clicked View for my custom object. From there, I see that all my fields are checked as visible.

Does anyone have an idea what I'm doing wrong or how to fix this?
Best Answer chosen by Jonathan Vance 5
Jonathan Vance 5Jonathan Vance 5
Duplicate question with answer here: https://developer.salesforce.com/forums/ForumsMain?id=906F0000000Asx4IAC

My fields were all checked as visible, but I had to click the Edit button on the Public Access Settings screen, and then I was able to update the permissions on my custom objects, checked Read on those, now it works fine.

All Answers

bob_buzzardbob_buzzard
Is this the same custom object record on all three pages?  If so, it may be sharing rules impacting you - if the page that doesn't display the data is using a standard controller or a custom controller marked as 'with sharing', the record will only be displayed if org-wide defaults allow or it has been shared with the guest user.
Jonathan Vance 5Jonathan Vance 5
Thanks, but my custom controller is not marked as 'with sharing' so I don't think this solves my problem. Do you have any other suggestions please?
Jonathan Vance 5Jonathan Vance 5
Duplicate question with answer here: https://developer.salesforce.com/forums/ForumsMain?id=906F0000000Asx4IAC

My fields were all checked as visible, but I had to click the Edit button on the Public Access Settings screen, and then I was able to update the permissions on my custom objects, checked Read on those, now it works fine.
This was selected as the best answer