I have created a custom date/time field "Date_Created" and I am trying to write a workflow that autopopulates with zoho.currenttime. its not working. I created a workflow to be triggered when a lead is created and custom function SetDateCreated()
leadIdStr = input.leadId.toString();
mp = map();
mp.put("Date_Created",zoho.currenttime);
update = zoho.crm.updateRecord("Leads", leadIdStr, mp);
info update;
----
but when I try and save/execute it says "failed to save function variable 'leadId' is not defined"