I'm trying to access a contact object field through a related object's lookup field. Billing_contact__c below (2nd td) is an entity object lookup field that has a related contact record. When I reference the Address__c field in the contact object, I get the following error:

Error: Unknown property 'String.Address__c'

Any idea why? And how can I accomplish my goal of displaying this contact object field?

        <apex:repeat value="{!entities}" var="r">
              <td><apex:outputfield value="{!r.Inactive__c}"></apex:outputfield></td>

Relationships need to be navigated with the "r" extension, e.g.


The "c" is the field itself, which is just an ID (hence the error about String); the "r" is the relationship.

  • Great, thank you. – geeljire Mar 17 '13 at 15:52

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.