Skip to main content
meghna m 님이 #Data Management에 질문했습니다
Can any one help me on this. I have a visual force page created in PDF format. Based on the Condition i need to Display the Value.

 

1)If the product line for the product selected in opportunity items is equal to ‘ DIE’ make following changes .

 

a) unit price should change to $0.01.

 

b)Extension =Qty*0.01

 

c)Subtotal =(Non_pick_total)

 

But Extension is formula field which is (Extension=qty*1) and

 

Non_pick_total is a Roll up summary field which Aggregates the Extension.

 

 

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 .

 

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 =opportunity.Non_Pick_Total__c*tempObj.unitprice;

}

else

{

tempObj.unitprice=1;

//tempObj.unitprice=OPplineitem[i].ListPrice;

tempobj.extension=OPplineitem[i].Extension__c;

}

 

I Get Error As :Arithmetic expressions must use numeric arguments at line

 

tempObj.Subtotal =opportunity.Non_Pick_Total__c*tempObj.unitprice;

 

Subtotal and Non_Pick_Total__c are Roll-Up Summary (SUM Opportunity Product ) and UnitPrice is a Currency data type

 

 

Any help very much appreciated

 

 
답변 2개
0/9000