You need to sign in to do that
Don't have an account?
ikamsf
Displaying nested custom object fields in visual page
I have a custom object House__c with a lookup field which is another custom object and it's called House_Address__c and it is from custom object of Address__c.
I am using standard controller for House__c and recordsetvar houses in my visualforce page, but this is not working to display the Zipcode__c from the Address__c object.
Do I need to extend the controller and add code to do this? If yes, please share some instructions/tutorials for the solution. Thanks!
I am using standard controller for House__c and recordsetvar houses in my visualforce page, but this is not working to display the Zipcode__c from the Address__c object.
Do I need to extend the controller and add code to do this? If yes, please share some instructions/tutorials for the solution. Thanks!
<apex:pageBlockTable value="{!houses}" var="item"> <apex:column value="{!item.House_Name__c}"/> <apex:column value="{!item.House_Address__c}"/> <apex:column value="{!item.House_Address__c.Zip__c}"/> </apex:pageBlockTable>
All Answers
You need add to your soql query House_Address__c.Zip__c field.
Thanks,
Alex
and create extension
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
Didn't understand relationship 'House_Address__c' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.
thanks,
alex
and in visualforce page: