Null Error on code that Zoho created
A code created by the Zoho team. Seemed to work at first, but today I noticed it hasn't worked the past couple of days and it now gives me a "ERROR AT NULL" message when I save..
- leadIdStr = input.leadId.toString();
- leadDetails = zoho.crm.getRecordById("Leads", input.leadId);
- info leadDetails;
- createdtime = ifnull(leadDetails.get("Created Time"),"");
- createdhour=createdtime.toString("dd-MM-yyyy HH:mm:ss").toTime().getHour();
- info createdhour;
- if ((createdhour >= 17 ) && (createdhour < 22 ))
- {
- mp=map();
- mp.put("SMOWNERID","1801781000000113053");
- update=zoho.crm.updateRecord("Leads", leadIdStr, mp);
- info mp;
- info update;
- }