Here is my Apexclass

public  class Orgfinhist {
   public OrgFinHist__c mcc {get; private set;}
   public Orgfinhist (ApexPages.StandardController sc) {
       mcc = (OrgFinHist__c) sc.getRecord();

and my visualforcepage name: org

<apex:page standardController="OrgFinHist__c" extensions="Orgfinhist ">
     <apex:inputField value="{!mcc .name}"/>



and error displaying:Error: Unknown property 'mcc' referenced in org

  • Remove the apex:page tags that surround the apex:inputField; they may be hiding the attributes of the outer (correct) apex:page tags. – Keith C Jun 9 '14 at 15:20

Like Keith said before, you don't need the extra page tags around the input field.

<apex:page>//remove this line
  <apex:inputField value="{!mcc .name}"/> // <--remove extra space {!mcc.name}
</apex:page>//remove this line

Since you are using an input field, you have 2 choices.

1) Use the standard controller object.

<apex:inputField value="{!OrgFinHist__c.Name}" />

2) Make the setter public

public OrgFinHist__c mcc {get; set;}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.