I am trying to use the below custom function, when retrieving "sub_total" it keeps returning "emtpy" however it works with "total" but I want to retrieve the sub total of the estimate.
crmpotid = estimate.get("zcrm_potential_id");
total = 0.0;
relest = zoho.books.getRecords("Estimates",801886364,"zcrm_potential_id").get("estimates");
for each rec in relest
{
esttotal = rec.get("sub_total").toDecimal();
total = total + esttotal;
}
mp = Map();
mp.put("Amount",total);
update = zoho.crm.updateRecord("Deals",crmpotid,mp);
info mp;
info update;