I have written the below code that will update a field with the remaining months left in a contract. Within Deluge i can get it to work correctly, I dont seem to be able to get the value to update in the neccassary field though.
product_information = zoho.crm.getRecordById("Product_Information",product_informationId);
months_left = monthsdiff(Rental_End_Date.toDate(),today.toDate());
info months_left;
mp = Map();
mp.put("Balance_of_Term",months_left);
update = zoho.crm.updateRecord("Product_Information",product_informationId,mp);
info mp;
info update;