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
shrey.tyagi88@tcs.comshrey.tyagi88@tcs.com 

Visualforce not working on Force.com Site- Please help!!

Hi All ,
     I have this VF page that renders the page as PDF file upon click of a button . This works well in salesforce , however it does not work and goes to salesforce login screen when the button is clicked on Force.com site . Please help. I have explicitly given access of this page to the site as well. 

Button : Generate PDF (On Object Detail Page- This page is accessible from force.com site as well , button is also visible to site users.)

Visualfoce Page tied to the button mentioned above is given below:


<apex:page standardController="Project_Form__c" showHeader="true" tabStyle="Project_Form__c" renderas="pdf" >
   <apex:detail relatedList="false" title="true"/>
</apex:page>
Amit Singh 1Amit Singh 1
Hello Shrey,

May I suggest you to please check if the page is visible for the profile of the user that is login. Also, if page is accessible to the profile then please make sure that Object and fields are accessible that are being used into VF page and it's controller class.

Let me know if this helps :)
Thanks,
AMit Singh
shrey.tyagi88@tcs.comshrey.tyagi88@tcs.com
Amit - Thanks for your time on this. But as I mentioned above I am talking about a user who is accessing the page through Force.com site. Hence the concept of profile is not applicable here. I have ex[osed the page and the controller to the site though.