I am attempting to create a "website" using a vf page that will allow retail stores to add customers to our retail loyalty program using an online form.
I created a custom object "Loyalty Program Member" in our Salesforce instance and I'm trying to code the appropriate vf form page for the web site as a place for retailers to enter new participants in our retail loyalty program , the idea is the information from the web form would get pushed into the corresponding Loyalty Program Member object and create a new record right now I keep getting this error code
Here is the code I have written, can anyone tell me what I've done wrong or is this a lot more complicated then it seems.
<apex:page standardController="Loyalty_Program_Member">
<apex:form id="changeStatusForm">
<apex:pageBlock >
<apex:pageblocksection title="Loyalty Program Member Detail">
<apex:inputfield value="{!Loyalty_Program_Member.first_name}"/>
<apex:inputfield value="{!Loyalty_Program_Member.last_name}"/>
<apex:inputfield value="{!Loyalty_Program_Member.full_name}"/>
<apex:inputfield value="{!Loyalty_Program_Member.street_address}"/>
<apex:inputfield value="{!Loyalty_Program_Member.city}"/>
<apex:inputfield value="{!Loyalty_Program_Member.province_state}"/>
<apex:inputfield value="{!Loyalty_Program_Member.country}"/>
<apex:inputfield value="{!Loyalty_Program_Member.postal_zip}"/>
<apex:inputfield value="{!Loyalty_Program_Member.home_phone}"/>
<apex:inputfield value="{!Loyalty_Program_Member.mobile}"/>
<apex:inputfield value="{!Loyalty_Program_Member.email}"/>
<apex:inputfield value="{!Loyalty_Program_Member.type_of_pet}"/>
<apex:inputfield value="{!Loyalty_Program_Member.product_purchased}"/>
</apex:pageblocksection>
<apex:pageblocksection title="Retailer Information">
<apex:inputfield value="{!Loyalty_Program_Member.retailer_name}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_address_street}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_address_city}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_address_state_province}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_address_country}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_address_postal_zip}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_phone}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_fax}"/>
<apex:inputfield value="{!Loyalty_Program_Member.retailer_email}"/>
</apex:pageblocksection>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Any help ort suggestions would be greatly appreciated.
Regards, Roger
Hi Roger,
It should insert a new record. Could you check from the database if it is inserted or not? It may be issue of redirection of page. You can also find the same help here: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_std_actions.htm
Thanks
Vrajesh Sheth
Skype:vrajesh.sheth