Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.

Hello Everyone,

A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it.
 
Requirement:-
 
Quote
One of our customers created a custom field in the Task layout named "Critical Update" (Type - Single line). Whenever this field is updated in the Feasibility Check Task, it should sync with the Development Stage Task, and vice versa, ensuring both tasks remain aligned and no updates are missed.
 
Above requirement can be implemented using Task custom functions along with Workflow rules in Zoho Projects.
 
Custom function code:-
 
taskParameter = Map();
taskParameter.put("index",0);
taskParameter.put("range",200);
taskResponse = zoho.projects.getRecords(portalId,projectId,"tasks",taskParameter,0,"XXXXXXX");
if(taskResponse.containKey("tasks"))
{
tasks = taskResponse.get("tasks");
for each task in tasks
{
task2Name = task.get("name");
if((task1Name=="Feasibility check" && task2Name=="Development stage")||(task1Name=="Development stage" && task2Name=="Feasibility check ") ) {
updateTaskParameter = Map();
custom_fields = Map();
//enter the proper name of the custom field here
custom_fields.put("UDF_CHAR1", Critical Update);
updateTaskParameter.put("custom_fields",custom_fields);
updateTaskResponse = zoho.projects.update(portalId,projectId,"Tasks",task.get("id"),updateTaskParameter,"XXXXXXX");
info updateTaskResponse;
info "taskName : "+taskName;
info "task.get(name) : "+task.get("name");
break;
}
}
}
 
return "success";
 
NotesMake sure to replace XXXXXXX with the Zoho Projects connection link name with scope ZohoProjects.Tasks.ALL. Check this link to learn how to create the connection. Also, replace Task names and custom field names based on your requirement.

By leveraging the custom function code, our customer successfully utilized Task custom functions in Zoho Projects. This automation streamlined task updates, eliminating the need for manual checks and updates in both tasks, ultimately enhancing business productivity.

We hope you found this post useful. If you have any questions, feel free to share them in the comments below.


Attachments
Arguments.png
Arguments.png63 KB
1 user likes this announcement.
Reply
Reply to Saraswathi SA
/* */
  • 12
  • Insert
  • Plain text
Add Comment
(Up to 20 MB )