1

I want to make a table that uses both a QuoteLineItem and a Product2 on the same line, but I don't think a wrapper class would work. If so I apologize, maybe I'm just overthinking it. The table would look something like this:

Headers: Product Name, Product Code, Quantity, Unit Price, Total Price

Row 1: {!prod.name}, {!prod.ProductCode}, {qli.Quantity}, etc..

Row 2: {!prod.name}, {!prod.ProductCode}, {qli.Quantity}, etc..

This would all be in an Apex:pageBlockTable, any idea how it would be done?

2

1 Answer 1

0

You need to go for wrapper class in this kind of scenario. Create a list of wrapper class in the controller and add wrapper instances to it. Then in pageblockTable, you can iterate over it and show data..

2
  • Thank you victor, how can I make it so one element of the list contains both a QuoteLineItem and a product?
    – Mike Stomp
    Jun 26, 2015 at 15:27
  • You need to iterate over both lists, one inside another and then create wrapper instances.
    – Victor
    Jun 26, 2015 at 15:30

You must log in to answer this question.

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