You need to sign in to do that
Don't have an account?
No access to SFDC objects in production
I try to create my first Force.com site. It works perfectly in sandbox, but in production I can't access any SFDC object. In my case I need aceess to Contacts (only to read, no changes). I check Field-Level Security, set Read and Create permissions for Contact object in Public Access Settings and created a simplest default VF page (below).
<apex:page standardcontroller="Contact" recordSetVar="Contacts" > <apex:form > <apex:pageBlock title="Contacts"> <apex:pageBlockTable value="{!Contacts}" var="Contact"> <apex:column headerValue="Name"> {!Contact.Name} </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
When I open my site (this page), the list on the page is empty. When I set up Tab Settings for Contacts in "Default On" and try to click tab "Contacts" I get "Authorization Required" page. In Preview as Admin mode there is an additional info: "Page not allowed fo profile:/it/003/o". How can it help me? The similar situation is for any other SFDC object. I can't access nothing! I searched Community but didn't found any working solution. I understand, that the problem is in absent permissions for something, but don't know what to do else.
In Sites, you aren't allowed to view the standard pages as a guest user (like 003/o)
If you want to use a visualforce page to view a record, you'll need to pass in the id into the query string.
Example:
http://mysite.force.com/apex/conPage?id=003000000000001
You can access this Standard Object information from site and manipulate DML , Prior to it yiu need record Id
Thanks,\
Bala
Thanks to all who answered! I've read answers with attention but... I try to describe the problem once again. In the controller of a site VF page I want to select some Contacts on some conditions. But testing this I found that even SOQL
returns nothing despite any Access Settings for the site. Eventually I decided to get Contacts at all in any way. And I can't!
You advise to set id in URL. That is wonderful for a single record. But what about set of records in Apex? The problem is actual so far.
Bala Wani, I tested DML as you proposed. Unfortunately with the same result. I used the following simple code:
And I got 0, not 100 as excepting. When I try the page as VF page, not as a site, I get 100.