0

I have a custom text area field Description__c on a custom object Custom_Object__c. I have a controller with a property (global Custom_Object__c customObject {get;set;}) which is being used here:

<apex:outputPanel rendered="{!shouldRender}">
    <apex:inputField value="{!customObject.Description__c}"
        label="{!$ObjectType.Custom_Object__c.fields.Description__c.label}" />
</apex:outputPanel>

When the page first loads, the correct existing value is put into the text box that is formed by the inputField, yet when I click a button that has an action of trying to update the customObject object, I get the error

Could not resolve field 'Description__c' from value binding '{!customObject.Description__c}' in page

I've seen cases where this error comes from trying to use inputField on a non-SObject object but this is both an SObject and a field on that SObject so this doesn't make any sense to me.

Also, this isn't a permissions error because I have both read and write access.

  • Can you post your controller/extension code? Is that possible that there are method called getCustomSObject() in your controller? – kurunve Feb 1 '17 at 15:11
  • can't post it all but there isn't a method like that. The only way that object is being accessed is through the getter above – Embattled Swag Feb 1 '17 at 15:19
  • are there get/set property defined on customObject variable? (like public Custom_Object__c customObject{get; set;} ) – kurunve Feb 1 '17 at 15:41

Your Answer

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

Browse other questions tagged or ask your own question.