Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Why am I getting the following error?

Unknown property

Controller Extension

public class CrewWorkDetailController{

    public final Installation__c installation ;

    public CrewWorkDetailController(ApexPages.StandardController stdController)
    {
        this.installation = (Installation__c) stdController.getRecord() ;
    }
}

View:

<apex:page standardController="Installation__c" extensions="CrewWorkDetailController">
    {!installation.Name}
</apex:page>
share|improve this question

1 Answer 1

up vote 6 down vote accepted

You haven't defined a getter for your Installation__c instance variable. Try replacing this line

public final Installation__c installation ;

with

public final Installation__c installation {get; private set;}

This will allow the VF page to be able to access the installation variable.

share|improve this answer
5  
It should be noted that Visualforce requires a public getter or setter to access the variable; it's not enough to simply mark the member as public. –  sfdcfox Jun 12 at 1:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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