// TODO: Please create a connection for the Zoho Projects service with the scopes "ZohoProjects.task.ALL". Replace 'xxxxxxxxx' with the connection name. Click this link below to learn how to create the connection.taskDetails = zoho.projects.getRecordById(portalId,projectId,"tasks",taskId,"xxxxxxxxx");info "current task Details : " + taskDetails;info "-------------------------------------";parentTaskId = "";if(taskDetails != null && taskDetails.get("tasks") != null && taskDetails.get("tasks").size() > 0){taskInfo = taskDetails.get("tasks").get(0);parentTaskId = taskInfo.get("parent_task_id");}info "parentTaskId: " + parentTaskId ;if(parentTaskId != null && parentTaskId != ""){parentTaskDetailsOfCurrentTask = zoho.projects.getRecordById(portalId,projectId,"tasks",parentTaskId,"xxxxxxxxx");if(parentTaskDetailsOfCurrentTask != null && parentTaskDetailsOfCurrentTask.get("tasks") != null && parentTaskDetailsOfCurrentTask.get("tasks").size() > 0){parentTaskInfo = parentTaskDetailsOfCurrentTask.get("tasks").get(0);parentTaskStatusId = parentTaskInfo.get("status").get("id");updateTaskParameter = Map();updateTaskParameter.put("custom_status",parentTaskStatusId);info updateTaskParameter;taskDetails = zoho.projects.update(portalId,projectId,"Tasks",parentTaskId,updateTaskParameter,"xxxxxxxxx");info "updated Task response : "+ taskDetails;}}return "success";
Custom functions also make it easier to collaborate with other team members on your codebase. By encapsulating complex logic in reusable functions, you can create a more modular and flexible codebase especially useful when working on large, complex projects with multiple team members.
Creating custom functions in Zoho Projects is straightforward and well-documented. Zoho provides a range of built-in functions that you can use as a starting point, and you can also easily define your own functions using Zoho's scripting language, Deluge. If you're facing a complex use case in Zoho Projects, I highly recommend giving custom functions a try.
Writer is a powerful online word processor, designed for collaborative work.