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

  • Have you assigned value in ForecastingItem variable? What is the datatype? – Anurag Bhardwaj Oct 5 '16 at 15:59
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>
| improve this answer | |
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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.