Create Custom Function: A new event, updates a date/time field in the Deals Module.
I need help using a workflow to update a custom date/time field in the Deals Module.
Basically, I want to run a report that shows me the last "Appointment Date" for a Deal. To do that, I need a new event to populate the "From" date in the Appointment Date field in the deals module.
Currently using this and it's not working:
- eventDetails = zoho.crm.getRecordById("Events",eventId.toLong());
- seid = ifnull(eventDetails.get("RELATEDTOID"),"");
- semodule = ifnull(eventDetails.get("SEMODULE"),"");
- fromdate = ifnull(eventDetails.get("Start DateTime"),"").toDate();
- if(semodule == "Deals")
- {
- mp = Map();
- mp.put("Appointment_Date",fromdate);
- updateResp = zoho.crm.updateRecord("Deals",seid,mp);
- info mp;
- info updateResp;
- }