Hello Everyone,
Here we are again thrilled to share another requirement that has been accomplished through the implementation of Custom Functions.
A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it.
Requirement:-
One of our customers wanted to update the Task's Completion Date to match the Due Date, indicating no deviation in completion. This was accomplished using custom functions along with Task workflow rules.
Custom function code:-
//TODO: Please create a connection for the Zoho Projects service with the scopes "Zohoprojects.tasks.ALL"
Click this link to learn how to create the connection.
if(dueDate != null)
{
updateTaskParameter = Map();
updateTaskParameter.put("completed_on",toString(dueDate,"MM-dd-yyyy"));
updateTaskParameter.put("completed_on_time",toString(dueDate,"hh:mm a"));
updateTaskResponse = zoho.projects.update(portalId,projectId,"tasks",taskId,updateTaskParameter,"XXXXXXX");
}
return "success";
Make sure to replace XXXXXXX with the Zoho Projects connection link name with scope Zohoprojects.tasks.ALL. Screenshot of the list of parameters to be mapped and sample Task workflow rule is attached for reference.
Using the above custom function code, our customer was able to leverage Task custom functions in Zoho Projects. This allowed them to automate task updates, reducing the time spent manually updating the completion date, and thereby increasing their business productivity.
We hope you found this post useful. If you have any questions, feel free to share them in the comments below.