Calculate totals in a loop
Hi,
total = 0.0 ;
for each rec in resp
{
total = (total + (rec.get("Amount")).toDecimal()) ;
}
When I run this on my CRM I get the following error: "Error evaluating NUMERIC expression :". That is all I get and I know it occurs on that line. My "Amount" field is type Currency. Would that be causing the issue?
Hope someone can help.
Thanks.