You need to sign in to do that
Don't have an account?
Retreever
Visualforce page to create records for custom object from Force.com site NOT working!!!
Ok, so I successfully got a VF Page Form to show on my Force.com site , anyone can go to the URL and see the form , even fill it in BUT when you hit "Save" you get the following error message: "Authorization Required-You must first log in or register before accessing this page.If you have forgotten your password, click Forgot Password to reset it."
I have confirmed the guest user permissions are set properly on the Custom Object and in the OWD settings , I have been researching , reading and watching videos for the last week but I have been unable to determine what the problem is. Attached is the code for the VF page.
I think it's something to do with using "standardController" maybe I need a custom controller to make this work - anyone have any suggestions?
Thanks, Roger
I have confirmed the guest user permissions are set properly on the Custom Object and in the OWD settings , I have been researching , reading and watching videos for the last week but I have been unable to determine what the problem is. Attached is the code for the VF page.
I think it's something to do with using "standardController" maybe I need a custom controller to make this work - anyone have any suggestions?
<apex:page standardController="Loyalty_Program_Member__c"> <apex:messages /> <apex:form id="changeStatusForm"> <apex:pageBlock > <apex:pageblocksection title="Loyalty Program Member Detail"> <apex:inputfield value="{!Loyalty_Program_Member__c.First_Name__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Last_Name__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Full_Name__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Street_Address__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.City__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Province_State__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Country__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Postal_Zip__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Home_Phone__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Mobile__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Email__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Type_of_Pet__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Product_Purchased__c}"/> </apex:pageblocksection> <apex:pageblocksection title="Retailer Information"> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Name__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Street__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_City__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_State_Province__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Country__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Postal_Zip__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Phone__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Fax__c}"/> <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Email__c}"/> </apex:pageblocksection> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>
Thanks, Roger
Thanks, Roger
Sorry for late reply!!
As you are using only standard controller, it is fine to add only VF page. It will be hard to say(assuming all the permissions are there) what could be the issue, however, you can follow following steps for troubleshooting
1. remove all field refernce from VF page except "<apex:inputfield value="{!Loyalty_Program_Member__c.First_Name__c}"/>" // just to check if it is happening due FLS seurity - see if it works
2. if not enable debug log for site user to see if logs shows any relevant information.
As I mentioned, you need to debug it using debug log. There is a very nice blog regarding this error, you may look into this.
http://www.tgerm.com/2010/10/debugging-sites-authorization-required.html