0

Hi I need to show a list of Forecastitems in a Visualforce page i have written a basic page with a standard controller however i am getting no values in the table.

There are opportunities and forecastitems in the sandbox

<apex:page standardController="ForecastingItem">
  <apex:pageBlock >
      <apex:pageblocksection >
         <apex:pageBlockTable value="{!ForecastingItem}" var="ForecastingItem">
         <apex:column value="{!ForecastingItem.id}"/>
         <apex:column value="{!ForecastingItem.PeriodId}"/>
         <apex:column value="{!ForecastingItem.ProductFamily}"/>
      </apex:pageBlockTable>

      </apex:pageblocksection>
  </apex:pageBlock>
</apex:page> 

enter image description here

Any guidance would be appreciated

1
  • Have you assigned value in ForecastingItem variable? What is the datatype? Commented Oct 5, 2016 at 15:59

2 Answers 2

0

You have to use a recordset var for this,

<apex:page standardController="ForecastingItem" recordSetVar="foreCastItem">

<apex:pageBlock >
<apex:pageblocksection >
    <apex:pageBlockTable value="{!foreCastItem}" var="fCI" >
      <apex:column value="{!fCI.id}"/>
         <apex:column value="{!fCI.PeriodId}"/>
         <apex:column value="{!fCI.ProductFamily}"/>
    </apex:pageBlockTable>
</apex:pageblocksection>
</apex:pageBlock>

</apex:page>
0

To show values in table, you need to add extension and write some apex code. May below link helps you:

Display Record in Page block table

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .