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
Navneeth RajNavneeth Raj 

What's wrong in this page?

<apex:page controller="Person">

        <apex:sectionHeader id="Own_VisualForce" title="Student Twin" subtitle="New Twin Student"
                        description="This is the VisualForce page of Student object"
                        help="/apex/MyVisualForcePage"
                        printUrl="https://c.ap2.visual.force.com/apex/Own?core.apexpages.request.devconsole=1"/>
    <apex:form >
    <apex:pageBlock id="OwnPageblock" title="Student Edit" tabStyle="Opportunity" dir="LTR" helpTitle="Any Help?"
                    helpUrl="https://ap2.salesforce.com/_ui/core/userprofile/UserProfilePage"
                    mode="inline edit" rendered="true" lang="en-IN">
   
        <apex:pageBlockButtons id="Own_pbb" title="PageBlockButtons" dir="LTR" lang="en-US" rendered="true" >
            <apex:commandButton value="Save"/>
            <apex:commandButton value="Save & New"/>
            <apex:commandButton value="cancel" />
            
        <apex:pageBlockSection collapsible="false" columns="4" rendered="true">
            <apex:inputField value="{!Person.Person_Name}"/>
            <apex:inputField value="{!Person.Course}"/>
            <apex:inputField value="{!Student.Country}"/>     

</apex:pageBlockSection>
        </apex:pageBlockButtons>
    </apex:pageBlock>
    </apex:form>
</apex:page>
User-added image
What's wrong in the above program (ERROR in Line 0 --> Unknown property 'Person.Person') & i'm trying to get the fields of a custom obj named "Person" as shown in the above picture. How to write a class with set & get
viruSviruS
Create a Apex Class with Standard Controller like   https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm

Change Account to Person your custom Object  with __c
David Holland 6David Holland 6
Do you have a Apex Class called "Person"?

Because if you use "controller", it looks for a class, instead of an object as your controller.

If you are wanting to use Account, then it should be:

<apex:page standardController="Account">

If it is a custom object then you need:

<apex:page standardController="Person__c">
Navneeth RajNavneeth Raj
I didn't created Person class. How to create it using SET & GET
Shailendra Singh ParmarShailendra Singh Parmar
Problem is in very first statment
<apex:page controller="Person">

it should be
<apex:page standardController="Person__c"> as you said that person is your custom object and you want to use standard controller.

Thanks!