Creating task using Custom function

Here’s sample code to create a task using Deluge script that can be used in Workflow automation rules of Zoho CRM.

crmResp = zoho.crm.getRecordById(“Contacts”,input.cid);

first=ifnull(crmResp.get(“First Name”),””);
last=ifnull(crmResp.get(“Last Name”),””);
name=first + ” ” + last;
mp=map();
mp.put(“SMOWNERID”,ifnull(crmResp.get(“SMOWNERID”),””));
mp.put(“Subject”,”Send Demand Letter”);
mp.put(“SEMODULE”,”CustomModule4″);
mp.put(“SEID”,input.dvid); //ID for SEMODULE
mp.put(“Status”,”Not Started”);
mp.put(“Due Date”,addDay(zoho.currentdate,25));
mp.put(“Priority”,”High”);
mp.put(“CONTACTID”,input.cid);
createres = zoho.crm.create(“Tasks”,mp);

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*