function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Geoff SpozettaGeoff Spozetta 

Custom List of Standard Object

Hi,

I;m trying to create a list of all current orders in a given object that dloes not rely on apex: listview, I am trying the following code:
 
<apex:page showHeader="false" standardController="custom_object__c" recordsetvar="orders" >
<apex:include pagename="InnovationsHeader"/>
<apex:include pagename="InnovationsNavBar"/>

    <apex:PageBlock title="Order List" rendered="{!IF($User.Id==custom_object__c.CreatedByID || $Profile.Name='System Administrator', true, false)}"  >    
	<apex:pageblocksection>
		<apex:pageblockTable value="{!orders}" var="o">
			<apex:column headervalue="Order ID">
				<apex:outputtext value="{o.Name}"/>
			</apex:column>
		</apex:pageblockTable>
	</apex:pageblocksection>
</apex:pageblock>
<!-- FOOTER -->
 <apex:include pagename="InnovationsFooter" />   
</apex:page>

Howebver, when rendering, the list only shows the following:

{o.Name}
{o.Name}
{o.Name}
{o.Name}
{o.Name}
{o.Name}
{o.Name}
{o.Name}


Can someone shed some light on this, perhaps point me where I need to go to show some order numbers?



 
Best Answer chosen by Geoff Spozetta
Deepak GulianDeepak Gulian
Change Line 9
<apex:outputtext value="{!o.Name}"/>

All Answers

Deepak GulianDeepak Gulian
Change Line 9
<apex:outputtext value="{!o.Name}"/>
This was selected as the best answer
Amit Chaudhary 8Amit Chaudhary 8
Try below code:-
<apex:page showHeader="false" standardController="custom_object__c" recordsetvar="orders" >
<apex:include pagename="InnovationsHeader"/>
<apex:include pagename="InnovationsNavBar"/>

    <apex:PageBlock title="Order List" rendered="{!IF($User.Id==custom_object__c.CreatedByID || $Profile.Name='System Administrator', true, false)}"  >    
	<apex:pageblocksection>
		<apex:pageblockTable value="{!orders}" var="o">
			<apex:column headervalue="Order ID">
				<apex:outputtext value="{!o.Name}"/>
			</apex:column>
		</apex:pageblockTable>
	</apex:pageblocksection>
</apex:pageblock>
<!-- FOOTER -->
 <apex:include pagename="InnovationsFooter" />   
</apex:page>
Let us know if this will help you
 
Geoff SpozettaGeoff Spozetta
Thanks Deepak; I can see the error now :)