+ Start a Discussion
Mario HammerMario Hammer 

Can I traverse multiple levels of lookup relationships to get values in a pageBlockTable column?

This is quite a simple question. This is not working in my code:
<apex:column headerValue="{!$Label.ContractManagementColumnCustName}" value="{!waitlistItem.Contract__r.Contact__r.Name}"/>
Error: Invalid field Contact__r for SObject Contract
I'm sure that my setup of objects is correct, so the relationship on object Contract__c exists. What am I doing wrong?
Swati GSwati G
What is the api name of contact field on Contract__c object?
Mario HammerMario Hammer
Thanks for your help! The API-Name is Contact__c.
It works now. It seems like I had a mistake in the SOQL query in my controller that supplies the data for the table. After I fixed that, the VF page compiles without errors.