itemlst.Quantity = templook[i].Quantity__c;
Here Quantity is of integer type and Quantity_c is of decimal type.How can I convert Quantity_c into Integer
itemlst.Quantity = templook[i].Quantity__c;
Here Quantity is of integer type and Quantity_c is of decimal type.How can I convert Quantity_c into Integer
Best Answer
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_integer.htm
Integer.valueOf will work.
Edit:
I used Decimal.intValue() and it works as shown.