You need to sign in to do that
Don't have an account?
Ben.Schauerhamer
How can I display SOQL parent relationship field on a VisualForce page?
Pardon the "newbie" question.
I am querying a custom object and would like to display the owner name on a VisualForce page with the list of objects that meet the criteria. The Apex Code that I am running is:
<pre>
public List<CustomObject__c> getCustomObject() {
List<CustomObject__c> customObject = [SELECT Name, Owner.Name, FROM Custom_Object__c];
return customObject;
</pre>
The VF Code I am using is
<pre>
<apex:repeat var="object" value="{!customObject}">
{!object.Owner.Name}
</apex:repeat>
Any help would be greatly appreciated.
I am querying a custom object and would like to display the owner name on a VisualForce page with the list of objects that meet the criteria. The Apex Code that I am running is:
<pre>
public List<CustomObject__c> getCustomObject() {
List<CustomObject__c> customObject = [SELECT Name, Owner.Name, FROM Custom_Object__c];
return customObject;
</pre>
The VF Code I am using is
<pre>
<apex:repeat var="object" value="{!customObject}">
{!object.Owner.Name}
</apex:repeat>
Any help would be greatly appreciated.
<pre>
<apex:repeat var="object" value="{!customObject}">
{!object.OwnerName}
</apex:repeat>
</pre>