Update Task API Limit Issue
I am running into issues with the API limit for update task in Zoho Projects.
In a typical Project, we have 120-130 Tasks and I would like a field change made to the Project to propagate down to all Tasks that belong to the Project. (In this case "Territory). I am running the below function upon field change of Project.Territory to update Task.Territory.
Is there any reasonable way to get around the 100x API usage limit for this function?
- // Get all tasks for the specified project ID
- taskDetails = zoho.projects.getRecords(portalId,projectId,"tasks",0,0,"xxxxxxxxxx");
- tasksList = taskDetails.get("tasks");
- // Create a map to specify the custom field update
- customFieldsMap = Map();
- customFieldsMap.put("UDF_CHAR82",territory);
- // Create the main map and nest the custom fields map within "custom_fields"
- updateTaskParameter = Map();
- updateTaskParameter.put("custom_fields",customFieldsMap);
- //only run code if Project.Territory is not null
- if(territory != null)
- {
- // Loop through each task in taskDetails (Tasks belonging to projectId)
- for each task in tasksList
- {
- // Access the ID of each task and Territory (UDF_CHAR82)
- taskId = task.get("id");
- taskTerr = task.get("UDF_CHAR82");
- //Check if Task has subtasks
- taskisParent = task.get("isparent");
- // If Task has Subtasks get all Subtasks belonging to this Task
- if(taskisParent == TRUE)
- {
- subTaskResponse = invokeurl
- [
- url :projectsAPIEndPoint + "/portal/" + portalId + "/projects/" + projectId + "/tasks/" + taskId + "/subtasks/"
- type :GET
- connection:"xxxxxxxxxx"
- ];
- //For each Subtask belonging to this task update Territory if not already matching
- for each subTask in subTaskResponse.get("tasks")
- {
- // Access the ID of each task and Territory (UDF_CHAR82)
- subtaskId = subTask.get("id");
- subtaskTerr = subTask.get("UDF_CHAR82");
- if(subtaskTerr.toString() != territory.toString())
- {
- subtaskUpdate = zoho.projects.update(portalId,projectId,"Tasks",subtaskId,updateTaskParameter,"xxxxxxxxxx");
- }
- }
- }
- // Perform the update operation if Task.Territory differs from Project.Territory
- if(taskTerr.toString() != territory.toString())
- {
- taskUpdate = zoho.projects.update(portalId,projectId,"Tasks",taskId,updateTaskParameter,"xxxxxxxxxx");
- }
- }
- }
- return taskUpdate;
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
Building extensions #10: Fetch customized user inputs, store them globally at the app level, and access them across entities
This data storage concept enables you to store data related to your extension for both entity properties and extension properties. In our previous piece, we looked at how to store data for entities using entity properties. In this post, we'll look at
Building extensions #9: Store, retrieve, and access entity-specific data in widgets using data storage
Data storage - Overview Storing data related to the extension you are working on is essential. It can be saved as key-value pairs for an entity or extension, known as entity and extension properties, respectively. Data can be saved for the following entities
Building extensions #7: Create custom widgets for a simplified end-user experience
Discover the benefits of using widgets! We explored the significance of widgets, prerequisites, and the availability of JS SDK methods as part of our previous post. In this post, let's go over a detailed example of using widgets along with certain Zoho
Building extensions #6: Custom user interfaces with Widgets
Welcome to our post on Widgets for Zoho Projects! In our last post, we explored the significance of the connections feature, showed how to use it, and provided an example use case. In this article, we'll look at the importance of widgets, another feature
Building extensions #5: Integrating applications with Zoho Projects through Connections
In our last post, we discussed the essential features that a Zoho Projects extension can provide. Starting with this post andin every subsequent post going forward, we'll go through each of those features in depth, one by one, with an example use case.
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.