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?

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..

  • 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 '15 at 15:27
  • You need to iterate over both lists, one inside another and then create wrapper instances. – Victor Jun 26 '15 at 15:30

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.