You need to sign in to do that
Don't have an account?
azar khasim
I want an Controller Class for this Visualforce Page please help me
I just want a Controller Class for the Below Visualforce Page.
Please Help me in it.
Here below is my VF Page.
<apex:page controller="Booking_Link__c">
<apex:form >
<apex:sectionHeader title="Person Customer Edit" subtitle="New Customer"/>
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Customer Information" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.Name}"/>
<apex:inputField value="{!booking link__c.Salutation__c}"/>
<apex:inputField value="{!booking link__c.First_Name__c}"/>
<apex:inputField value="{!booking link__c.Middle_Name__c}"/>
<apex:inputField value="{!booking link__c.Last_Name__c}"/>
<apex:inputField value="{!booking link__c.Gender__c}"/>
<apex:inputField value="{!booking link__c.Relation__c}"/>
<apex:inputField value="{!booking link__c.Father_Husband__c}"/>
<apex:inputField value="{!booking link__c. Pan_Number__c}"/>
<apex:inputField value="{!booking link__c. Aadhar_Number__c}"/>
<apex:inputField value="{!booking link__c.Date_Of_Birth__c}"/>
<apex:inputField value="{!booking link__c.Wedding_Anniversary__c}"/>
<apex:inputField value="{!booking link__c.Mobile__c}"/>
<apex:inputField value="{!booking link__c.Alternate_Mobile__c}"/>
<apex:inputField value="{!booking link__c.Phone__c}"/>
<apex:inputField value="{!booking link__c.Other_Phone__c}"/>
<apex:inputField value="{!booking link__c.Home_Phone__c}"/>
<apex:inputField value="{!booking link__c.Email__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Professional Information" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.Profession__c}"/>
<apex:inputField value="{!booking link__c.Designation__c}"/>
<apex:inputField value="{!booking link__c.Professional_Email__c}"/>
<apex:inputField value="{!booking link__c.Annual_Income__c}"/>
<apex:inputField value="{!booking link__c.CompanyMobile__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Office Address" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.Employed_by__c}"/>
<apex:inputField value="{!booking link__c.OfficeStreet__c}"/>
<apex:inputField value="{!booking link__c.OfficeCity__c}"/>
<apex:inputField value="{!booking link__c.OfficeState__c}"/>
<apex:inputField value="{!booking link__c.OfficeCountry__c}"/>
<apex:inputField value="{!booking link__c.OfficePinCode__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Children School Address" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.School_Name__c}"/>
<apex:inputField value="{!booking link__c.SchoolStreet__c}"/>
<apex:inputField value="{!booking link__c.SchoolCity__c}"/>
<apex:inputField value="{!booking link__c.SchoolState__c}"/>
<apex:inputField value="{!booking link__c.SchoolCountry__c}"/>
<apex:inputField value="{!booking link__c.SchoolPinCode__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Address Information" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.BillingCountry__c}"/>
<apex:inputField value="{!booking link__c.ShippingCountry__c}"/>
<apex:inputField value="{!booking link__c.BillingStreet__c}"/>
<apex:inputField value="{!booking link__c.ShippingStreet__c}"/>
<apex:inputField value="{!booking link__c.BillingCity__c}"/>
<apex:inputField value="{!booking link__c.ShippingCity__c}"/>
<apex:inputField value="{!booking link__c.BillingState__c}"/>
<apex:inputField value="{!booking link__c.ShippingState__c}"/>
<apex:inputField value="{!booking link__c.BillingPinCode__c}"/>
<apex:inputField value="{!booking link__c.ShippingPinCode__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Please Help me in it.
Here below is my VF Page.
<apex:page controller="Booking_Link__c">
<apex:form >
<apex:sectionHeader title="Person Customer Edit" subtitle="New Customer"/>
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Customer Information" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.Name}"/>
<apex:inputField value="{!booking link__c.Salutation__c}"/>
<apex:inputField value="{!booking link__c.First_Name__c}"/>
<apex:inputField value="{!booking link__c.Middle_Name__c}"/>
<apex:inputField value="{!booking link__c.Last_Name__c}"/>
<apex:inputField value="{!booking link__c.Gender__c}"/>
<apex:inputField value="{!booking link__c.Relation__c}"/>
<apex:inputField value="{!booking link__c.Father_Husband__c}"/>
<apex:inputField value="{!booking link__c. Pan_Number__c}"/>
<apex:inputField value="{!booking link__c. Aadhar_Number__c}"/>
<apex:inputField value="{!booking link__c.Date_Of_Birth__c}"/>
<apex:inputField value="{!booking link__c.Wedding_Anniversary__c}"/>
<apex:inputField value="{!booking link__c.Mobile__c}"/>
<apex:inputField value="{!booking link__c.Alternate_Mobile__c}"/>
<apex:inputField value="{!booking link__c.Phone__c}"/>
<apex:inputField value="{!booking link__c.Other_Phone__c}"/>
<apex:inputField value="{!booking link__c.Home_Phone__c}"/>
<apex:inputField value="{!booking link__c.Email__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Professional Information" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.Profession__c}"/>
<apex:inputField value="{!booking link__c.Designation__c}"/>
<apex:inputField value="{!booking link__c.Professional_Email__c}"/>
<apex:inputField value="{!booking link__c.Annual_Income__c}"/>
<apex:inputField value="{!booking link__c.CompanyMobile__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Office Address" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.Employed_by__c}"/>
<apex:inputField value="{!booking link__c.OfficeStreet__c}"/>
<apex:inputField value="{!booking link__c.OfficeCity__c}"/>
<apex:inputField value="{!booking link__c.OfficeState__c}"/>
<apex:inputField value="{!booking link__c.OfficeCountry__c}"/>
<apex:inputField value="{!booking link__c.OfficePinCode__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Children School Address" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.School_Name__c}"/>
<apex:inputField value="{!booking link__c.SchoolStreet__c}"/>
<apex:inputField value="{!booking link__c.SchoolCity__c}"/>
<apex:inputField value="{!booking link__c.SchoolState__c}"/>
<apex:inputField value="{!booking link__c.SchoolCountry__c}"/>
<apex:inputField value="{!booking link__c.SchoolPinCode__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Address Information" collapsible="false" columns="2">
<apex:inputField value="{!booking link__c.BillingCountry__c}"/>
<apex:inputField value="{!booking link__c.ShippingCountry__c}"/>
<apex:inputField value="{!booking link__c.BillingStreet__c}"/>
<apex:inputField value="{!booking link__c.ShippingStreet__c}"/>
<apex:inputField value="{!booking link__c.BillingCity__c}"/>
<apex:inputField value="{!booking link__c.ShippingCity__c}"/>
<apex:inputField value="{!booking link__c.BillingState__c}"/>
<apex:inputField value="{!booking link__c.ShippingState__c}"/>
<apex:inputField value="{!booking link__c.BillingPinCode__c}"/>
<apex:inputField value="{!booking link__c.ShippingPinCode__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Greetings to you!
Please change the controller name from Booking_Link__c, don't use object name as a controller name. As Sunil suggested, use a different property name in visualforce page instead of booking_Link__c
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
Controller:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Please refer the below code:
With this controller, you have to use objBillingLink in the VF page instead of booking link__c. Like:
<apex:inputField value="{!objBillingLink .Name}"/>
replace all the booking link__c refernce with objBillingLink.
Hope this will help you, if yes then please mark it as best answer so that it can also help others.
Many Thanks,
Sunil Rathore
Greetings to you!
Please change the controller name from Booking_Link__c, don't use object name as a controller name. As Sunil suggested, use a different property name in visualforce page instead of booking_Link__c
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
Controller:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Thank You, Sunil your suggestion was nice. I will definitely remember these things.
Thank You for your Controller Code, and it was a great thing to backup the members of the community with their ideas.
You are really a Humble Person with great Attitude. I will definitely remember this one for sure.
Thank You so much
With Regards,
Azar Khasim.
You are always welcome!!!
If it solves your problem then please mark it a solved/best answer so it may also help others in the future.
Many Thanks,
Sunil Rathore
So for that, I was giving to Khan Anas because it has both Controller class and Visualforce Page also.
So in the future, it will help the remaining customers to get the data fully without a doubt.