Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //gather deal id as input to function
- dealDetails = zoho.crm.getRecordById("Deals",dealId);
- contactId = dealDetails.get(***search API Names***);
- dealOwnerId = dealDetails.get("Owner").get("id");
- //general task map
- taskMap = Map();
- taskMap.put("Subject","insert subject here");
- taskMap.put("Owner",{"id":deal_owner_id});
- taskMap.put("Who_Id",{"id":contactId});
- taskMap.put("What_Id",{"id":dealId});
- taskMap.put("$se_module","Deals");
- taskMap.put("Priority","Normal");
- taskMap.put("Status","Not Started");
- taskMap.put("Task_Type","Task Type Here");
- taskMap.put("Due_Date",zoho.currentdate);
- taskMap.put("Description","Insert Description here");
- //after this for each task, just change subject, due date, and description as needed
- taskMap.put("Subject","new subject here");
- taskMap.put("Description","change description here");
- taskMap.put("Due_Date",zoho.currendate.addBusinessDay(1));
- create_task = zoho.crm.createRecord("Tasks",task_map,{"trigger":{"workflow"}});
Advertisement
Add Comment
Please, Sign In to add comment