Cannot Update Custom Field Using Custom Function

Cannot Update Custom Field Using Custom Function

Hi Team,

I am testing a simple custom function in Customer Payments module. I created a custom field in customer with API name cf_avg_days_to_pay.

However, this simple custom function won't update that custom field. Can you point out what am I missing? Thanks

custID = customer_payment.get("customer_id");
info custID;
orgID = organization.get("organization_id");
avgdays = 15;
mp = Map();
mp.put("cf_avg_days_to_pay",avgdays);
resp = zoho.books.updateRecord("Contacts",orgID,custID,mp);
info mp;