
2)If the product line for the product selected in opportunity items is other than ‘ DIE’ make following changes .a) unit price should change to $1.b)Extension =Qty*1The issue is the "Extension" field value is getting calculated based on the formula field but it should get calculated as per the changes made in visual force page and display (Extension =Qty*0.01) on the subtotal .
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;
}
else {
tempObj.unitprice=1;
//tempObj.unitprice=OPplineitem[i].ListPrice;
tempobj.extension=OPplineitem[i].Extension__c;
}
PFA Screen Shot :
2 réponses

Hi Gaurav ,Thanks for your reply.Their are no Errors.At step 1 the sub steps a (unit price should change to $0.01.) and b(Extension =Qty*0.01) works fine but at c we the Subtotal is getting calculated as per the Extension Formula,but it should get calculated as per the changes in VF page.In the Screen shot ,the red mark of the Extension when caluclated it is - 11 but the SUBTOTAL is reflecting as 1100 but it should be 11.The issue is the "Extension" field value is getting calculated based on the formula field but it should get calculated as per the changes made in visual force page and display (Extension =Qty*0.01) on the subtotal .Any help very much appreciated.