• superlou
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

With the standard controller for Opportunity, I am trying to generate a list of line items (products) with custom formatting.  I am using the following:

 

    <apex:page renderAs="pdf" standardController="Opportunity">

    <h2>Items</h2>
    <apex:repeat value="{!Opportunity.OpportunityLineItems}" var="OLI">
    {!OLI.Product2.name}
    </apex:repeat>
    </apex:page>

 

However, Product2 seems to pretty clearly a standard field in the line item SObject.  Other fields like CreatedBy and Discount work fine.  Is there a gotcha for dealing with references?

 

Thanks,

Louis

With the standard controller for Opportunity, I am trying to generate a list of line items (products) with custom formatting.  I am using the following:

 

    <apex:page renderAs="pdf" standardController="Opportunity">

    <h2>Items</h2>
    <apex:repeat value="{!Opportunity.OpportunityLineItems}" var="OLI">
    {!OLI.Product2.name}
    </apex:repeat>
    </apex:page>

 

However, Product2 seems to pretty clearly a standard field in the line item SObject.  Other fields like CreatedBy and Discount work fine.  Is there a gotcha for dealing with references?

 

Thanks,

Louis