You need to sign in to do that
Don't have an account?
Retreever
First VF Page
So I am starting to work with VF pages. My first goal is to have a VF form that would allow me to create new records in a custom object either from inside Salesforce or from a outside webpage using sites. With some help I have been able to create the form (see attached code and screen cap). But when I populate the form and hit save it doesn't seem to do anything, so I guess I've missed something or there's something wrong with my code. I would appreciate any suggestions and how to fix this.
<apex:page standardController="Loyalty_Program_Member__c"> <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>
Add <apex:messages /> right below the <Apex:page.....> like:
<apex:page standardController="Loyalty_Program_Member__c">
<apex:messages />
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
All Answers
Add <apex:messages /> right below the <Apex:page.....> like:
<apex:page standardController="Loyalty_Program_Member__c">
<apex:messages />
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
I have confirmed the permissions are set properly on the Custom Object and in the OWD settings , 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