You need to sign in to do that
Don't have an account?

PageBlockTable with Group of Items
So I have a pageblocktable that I populate with
Is that possible or is there a better option than pageblocktable. Note, I was only using the pageblocktable as I am not sure of how many items will be returned with the query.
Public List<OpportunityLineItem> oppLineItem {get;set;} oppLineItem = [Select Id, Discount, ListPrice, TotalPrice, PricebookEntryId, Product2Id, ProductCode, Name, Quantity, UnitPrice, Description FROM OpportunityLineItem WHERE OpportunityId = :oppId];What I would like to have happen is to group by Name and generate a sum for the Quantity.
Is that possible or is there a better option than pageblocktable. Note, I was only using the pageblocktable as I am not sure of how many items will be returned with the query.
If you need to get the Aggregate result then the best option is to query the record using AggregateResult. --
Thanks,
Prashant
All Answers
If you need to get the Aggregate result then the best option is to query the record using AggregateResult. --
Thanks,
Prashant
Please select the best answer and close this thread.
--
Thanks,
Prashant