+ Start a Discussion
Suman KunduSuman Kundu 

Can't show Discount field of OpportunityLineItem in Visualforce

I have built a page where I am showing existing opportunitylineItems extracted in the controller class of this page. In this controller class I can see the discount value present (in debug log), but it doesn't show any thing for discount. Though all the other fields are showing properly.

 

In controller class:

for(OpportunityLineItem oliR : [select Id, PriceBookEntryId, PriceBookEntry.Product2Id, PriceBookEntry.Product2.Name, PriceBookEntry.Product2.ProductCode, Group_Number__c, Is_Root_Product__c, Quantity, Discount, UnitPrice, TotalPrice, ServiceDate from OpportunityLineItem where OpportunityId = :oppId order by Group_Number__c, order__c])
            {
                oppLnItemLst.add(oliR);
                System.debug('****************>>'+oliR.Discount);
            }

 

In visualforce Page:

                                    <td>
                                        {!olIL.Discount}
                                        <!--
                                        <apex:outputText value="{0, number, $###,###,##0.00}" style="float:right;">
                                            <apex:param value="{!olIL.Discount}" />
                                        </apex:outputText>
                                        -->
                                    </td>

 

I really can't find any reason for this to be happened.

Please help me.