Skip to main content
meghna m preguntó en #Visualforce
Can any one help me on this ?RollUp Summary field can be multiplied in a visual force page.Based on the condition ,I need the value of the RollUp summary to get multipled (0.01) in wrapper class .

"Subtotal__c" and "Non_Pick_Total__c" are Roll up summary fields on Opportunity Object.They give the "Sum" of Opportunity Product aggregates on Extension Field.Extension(Extension=qty*1) is a Formula field data type as Currency on Opportunity Product.

The issue I'm having is that the "Extension" field value is getting calculated based on the formula field but it should get calculated as per the changes made in the visual force page and display (Extension = Qty*0.01) on the subtotal.

How do I achieve this?I shall appreciate your help.

Code :

 

if(OPplineitem[i].PricebookEntry.Product2.Product_Line__c=='DIE')

{

tempObj.unitprice=0.01;

tempobj.extension=OPplineitem[i].Quantity * tempObj.unitprice;

tempObj.productname=OPplineitem[i].Bin_Item_Code__c;

//tempObj.Subtotal =OPplineitem[i].Opportunity.Subtotal__c*0.01;

tempObj.Subtotal =OPplineitem[i].Opportunity.Subtotal__c*tempObj.unitprice;

}

 
1 respuesta
  1. 11 mar 2015, 12:25
    Based on current information I think you want to change value in Rollup summary field. Which is not possible as rllup sumary fields are not editable. You have to create a Decimal property in your wrapper class and calculate value over there.

    Could you explain a bit more of this problem.

     
0/9000