I have creayed a custom funciton that will schedule a call for 3 days in advance if the call sint answered, it works perfectly, howver i am unable to get the accoutn details to pull through, please can you adviise where i am going wrong here, I have commneted out teh account parts of the code as it was stopping my function from running
contactDetails = zoho.crm.getRecordById("Contacts",contactId);
//accountDetails = zoho.crm.getRecordById("Accounts",accountId);
createdtime = ifnull(contactDetails.get("Created_Time"),"").toTime("yyyy-MM-dd'T'HH:mm:ss").addDay(3);
mp = Map();
mp.put("Subject","Schedule Calls Test");
mp.put("Owner",ifnull(contactDetails.get("Owner"),"").get("id"));
mp.put("Call_Type","Outbound");
mp.put("$se_module","Calls");
mp.put("Who_Id",contactId);
//mp.put("What_Id",accountId);
mp.put("Call_Start_Time",createdtime.toString("yyyy-MM-dd'T'HH:mm:ss+02:00"));
mp.put("$which_call","ScheduleCall");
create = zoho.crm.createRecord("Calls",mp);
info mp;
info create;