I do something wrong but have no idea what. The answers I found didn't help me. I'm new with salesforce, probably don't understand an obvious thing.
I'm creating print button in Visualforce, and wanted to list all related objects - employers
So put the code:
<apex:pageBlock title="Employment">
<apex:pageBlockTable value="{!CI_Candidate__c.Employment__r}" var="Employment">
<apex:column value="{!Employment.CI_PRO_Account__c}"/> <apex:column value="{!Employment.Role__c}"/>
<apex:column value="{!Employment.Role_in_the_Company__c}"/>
<apex:column value="{!Employment.CI_PRO_Start_Date__c}"/>
<apex:column value="{!Employment.CI_PRO_End_Date__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
Error message:
Error: Invalid field Employment__r for SObject CI_Candidate__c
CI_Candidate__c
and the Employment object. Is Candidate the master and Employment the detail? – David Reed♦ Apr 17 '18 at 14:11