Auto-update the Successor Task Status.

Auto-update the Successor Task Status.

Hello folks!

We have come up with a new use case for custom function to help you automate the workflow of your tasks. Users can write their own Custom Functions using deluge and call them from a workflow.

Consider a scenario where the status of the successor task gets updated automatically once the predecessor task is marked complete. This can be done by creating a custom function in Deluge. You can add arguments using the "Task Status" field and associate it to a layout based on your preference. These arguments can be called in the function to automate your task flow. Click here to learn how to create a custom function.

Create a new connection

  1. Navigate to the Setup icon and select Marketplace.
  2. Click Connections under Marketplace and then Create Connection.
  3. Click Default Services under Pick your service.
  4. Select Zoho Projects.
  5. Enter Update Task Status as the Connection name and select the scopes ZohoProjects.tasks.READ, ZohoProjects.projects.READ, ZohoProjects.tasks.UPDATE

  6. Click the Create and Connect button.
  7. You will be prompted to connect to the newly established connection
  8. Click the Proceed button.
  9. The connection will be created once the accept button is clicked.

Note : Remember that 'Use Credentials of Login User' has to be switched off.

Workflow rule for automatically updating a Task

  1. Click in the top navigation bar.
  2. Navigate to Task Automation and click Workflow Rules .
  3. Click New Workflow Rule.
  4. Enter the workflow name, description, and select the required layout.
  5. Under Execute on, choose 'Update' then Choose 'Field Specific and Select 'Status' from drop down menu.
  6. Click Next.

Create and associate the custom function to the workflow

  1. Now, create a custom function and associate it with the workflow rule.
  2. Click on Add Action and then select Associate Custom Function.
  3. Click Create Custom Function in the Associate Custom Function page.
  4. In the Create Custom Function page type in the function name as Update Task Status.
  5. Add Arguments for project id, portal id, and milestone id as shown in the image below.
  6. Use this as the Sample Code and click Save.
  7. Associate the created Custom Function.
  8. Click Save Rule.

Sample Code:
  1. // Please replace 'xxxxxxxxx' with the project connection name with scopes ( ZohoProjects.tasks.READ, ZohoProjects.projects.READ, ZohoProjects.tasks.UPDATE )
  2. //Replace Custom Status to be update in successor task
  3. statusName = "In Review";
  4. // ZohoProjects API Endpoint
  5. projectsAPIEndPoint = " https://projectsapi.zoho.com/restapi";
  6. // Invoke Get Task details API
  7. taskDetails = zoho.projects.getRecordById(portalId,projectId,"tasks",taskId,"xxxxxxxxx");
  8. info taskDetails;
  9. info "-------------------------------------";
  10. // Get successor Task Ids From Task Details API Response
  11. if(taskDetails != null && taskDetails.get("tasks") != null)
  12. {
  13. taskInfo = taskDetails.get("tasks").get(0);
  14. currentTaskStatus = "";
  15. if(taskInfo != null && taskInfo.get("status") != null && taskInfo.get("status").get("name") != null)
  16. {
  17. currentTaskStatus = taskInfo.get("status").get("name");
  18. }
  19. info "Current Status " + currentTaskStatus;
  20. info "-------------------------------------";
  21. //Check task status is completed.
  22. if(currentTaskStatus == "completed" && taskInfo != null && taskInfo.contains("dependency") && taskInfo.get("dependency").contains("successor"))
  23. {
  24. taskSuccessor = taskInfo.get("dependency").get("successor");
  25. dependencyInfo = taskInfo.get("dependency").get("dependencyDetails");
  26. info taskSuccessor;
  27. info "-------------------------------------";
  28. if(taskSuccessor.size() > 0)
  29. {
  30. // Get Task Layout Details For Getting Status Ids
  31. taskLayoutDetails = invokeurl
  32. [
  33. url :projectsAPIEndPoint + "/portal/" + portalId + "/projects/" + projectId + "/tasklayouts"
  34. type :GET
  35. connection:"xxxxxxxxx"
  36. ];
  37. info taskLayoutDetails;
  38. info "-------------------------------------";
  39. statusNamevsIdMap = Map();
  40. // Get Task Status Id from task layout Response
  41. if(taskLayoutDetails != null && taskLayoutDetails.get("status_details") != null)
  42. {
  43. statusDetails = taskLayoutDetails.get("status_details");
  44. for each status in statusDetails
  45. {
  46. statusNamevsIdMap.put(status.get("name"),status.get("id"));
  47. }
  48. }
  49. }
  50. info "Status NamevsId Map: " + statusNamevsIdMap;
  51. // update status id to all successor tasks
  52. for each successorTaskId in taskSuccessor
  53. {
  54. if(statusNamevsIdMap.containKey(statusName) && dependencyInfo.containKey(successorTaskId))
  55. {
  56. successorTaskDetails = dependencyInfo.get(successorTaskId);
  57. successorProjectId = successorTaskDetails.get("PROJECTID");
  58. updateTaskParameter = Map();
  59. updateTaskParameter.put("custom_status",statusNamevsIdMap.get(statusName));
  60. info "updateTaskParameter: " + updateTaskParameter;
  61. //Invoke Update Task API
  62. taskDetails = zoho.projects.update(portalId,successorProjectId,"Tasks",successorTaskId,updateTaskParameter,"xxxxxxxxx");
  63. info "taskDetails: " + taskDetails;
  64. }
  65. }
  66. }
  67. }
  68. return "success";
  69. // Please replace 'xxxxxxxxx' with the project connection name with scopes ( ZohoProjects.tasks.READ, ZohoProjects.projects.READ, ZohoProjects.tasks.UPDATE )
If you would like us to help you will a new use case, leave it as a comment below or mail us at: support@zohoprojects.com .





      • Sticky Posts

      • Introducing Version-3 APIs - Explore New APIs & Enhancements

        Happy to announce the release of Version 3 (V3) APIs with an easy to use interface, new APIs, and more examples to help you understand and access the APIs better. V3 APIs can be accessed through our new link, where you can explore our complete documentation,
      • Time Based Workflow Rules for Projects and Tasks

        Project managers spend a significant amount of time manually monitoring task deadlines, notifications, and follow ups. Zoho projects' Workflow Rules help automate these repetitive processes and save valuable time. Workflow rules are a set of actions that
      • Organize and Clone Task Custom Views

        We have rolled out two new enhancements to task custom views: Custom View Groups and Custom View Clone. Custom View Groups Similar to predefined view groups, we have introduced groups for custom views to help organize and categorize them. My Custom Views:
      • Zoho Projects Roadshow, USA - 2024

        Dear Users, We are happy to announce the Zoho Projects Roadshows 2024 in USA. This is an excellent opportunity to learn more about Zoho Projects and gain in-depth knowledge of the advanced features. Our team will also discuss industry specific solutions
      • Project Billing with the Staff Hours Method in Zoho Projects

        The Staff Hours Billing Method in Zoho Projects allows you to bill your clients based on the actual time spent by each team member on a project, at the rate set for each user. This is useful for projects where different skill sets are needed and service

        • Recent Topics

        • Why is the Zoho portal not mobile friendly?

          I just got started with the portal and im sort of shocked how it looks. I already filled a hint/complaint about this. On the website you see a wonderful site with a modern design. Yet in real life its a mid 2000 look and feel. One major issue i see thats
        • New Asap Widget How to update my code

          I know you're still working on updating the documentation for calling the Asap Widget, the existing documentation is no longer valid. In the old 1.0 version I was able to do many things programmatically in javascript. I could open an article directly
        • Condition in templates

          Is it possible for me to add merge field conditionally in my templates. For example Dear ${Leads.Gender == "Male" ? "Sir" : "Ma"},
        • How to Dynamicaly display image in the Detailed View Report ?

          I have an "Add Employee" form that includes an image field for uploading an employee's profile picture from their local computer. In the "Apply Leave" form, I also have an image field where I want the employee's profile picture to be auto-populated based
        • ASAP Chrome Extension not loading

          We have ASAP enabled in Zoho Desk. I installed the ASAP Chrome Extension (Windows 10), but when I click the extension button while on our site, it never fully loads. I just get what's shown below.
        • Zoho Flow Custom Function to Register Sale in Zoho Thrive

          Hi Thrive team, I want to create a custom function which sends purchase information back into Thrive for Affiliate commission. I'm stuck on how to setup the connection, specifically creating an OAuth connection through https://api-console.zoho.eu/ Please
        • Sending User-centric reports to all users

          I would like to automate an e-mail report to all users that sends them a weekly e-mail listing their open Potentials.  I've created a Report that uses the ${CURRENTUSER} criterion and scheduled the report to send to several users, but they all receive
        • How do I add new line and format text in zoho desk ticket?

          I am generating a ticket via API and looking to update "description" field of ticket whenever I need. Is there a document where I can find supported formatting for description field on a ticket.  I need to find: Adding a new line and adding bold text,
        • Automation #6 - Prevent Re-opening of Closed Tickets

          This is a monthly series where we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk. Typically when a customer submits
        • Feature Request - Insert URL Links in Folders

          I would love to see the ability to create simple URL links with titles in WorkDrive. or perhaps a WorkDrive extension to allow it. Example use case: A team is working on a project and there is project folder in WordDrive. The team uses LucidChart to create a drawing/s for the project. The team member could create a link to the LucidChart drawing/s and allow WordDrive to truly be a repository for ALL the project documents, even those outside of WorkDrive. A folder is dedicated to a CRM account. A
        • ZOHO DESK ヘルプセンターの言語選択メニューの表示方法

          ZOHO DESK のヘルプセンターを構築し、多言語化設定をしました。 顧客のヘルプセンター画面右上に言語選択メニューが表示されないため、弊社の契約先会社に問い合わせましたが、「通常は多言語化をオンにすると表示するためCSS を触り過ぎではないか」 という指摘のみでした。 試行中ですが表示できません。 何か要因となる情報をお持ちの方がいましたらご教授いただけますと幸いです。 ↓の赤枠を表示したいのですが、表示できません。
        • How to reply to thread via API

          We have built a webapp for our customers that uses the Zoho Desk API to enable each customer to view their full list of tickets, view individual tickets and raise new tickets. The Zoho Desk API doesn't have the ability to reply to a ticket/thread. Replies
        • Email Builder Editor is not functioning or loading correctly

          Email editor function is not working or loading correctly in any template, new or old. Cleared my cache, restarted browser, problem unchanged.
        • Create Tasklist with Tasklist Template using API v3

          In the old API, we could mention the parameter 'task_template_id' when creating a tasklist via API to apply a tasklist template: https://www.zoho.com/projects/help/rest-api/tasklists-api.html#create-tasklist In API v3 there does not seem to be a way to
        • Issue in downloading the sent logs

          Hi Team, I'm unable to export the sent file for any email campaign. When selecting all fields, the system indicates that the document will be sent via email, but I haven't received it. At times, it shows a download option, but the file doesn’t get downloaded.
        • Integrate Google Chat with Zoho CRM for seamless collaboration

          Hello everyone, Sales is a team sport and sales reps have to be in constant communication with people inside and outside their organization. While email remains the most effective channel for important conversations, sales reps often collaborate via chat.
        • customers enter orders?

          Anyway we can let a customer into CRM and enter their own orders , no access to anything else except history reports, no access to any other contacts. Greg Aanes 2109 Queen Street Bellingha WA USA
        • Zoho Learn - URL Parameters for Externally Shared Articles?

          Hey Folks, Are there any parameters one can append to URLs for externally-shared articles? Specifically, can I add a parameter that hides the Manual name (use case being I want to embed the article in another webpage)? Also, can one password-protect an
        • Why Sharing Rules do Not support relative date comparison???

          I am creating a Sharing Rule and simply want to share where "Last Day of Coverage" (Date field) is Greater than TODAY (Starting Tomorrow). However, sharing rules don't have the option to compare a date field to a relative date (like today), only to Static
        • Post message to a channel using a simple one-line command!

          Hi Everybody! This post is all about posting a message in a Channel using cURL, Wget and PowerShell. cURL is a light-weight, command interface used to transfer data to a server. The steps are pretty easy!  The three most important points here are  Generating an Auth token Get your Channel Unique Name Form your message as a JSON structure Generating an Auth token To use the 'Messaging API' you'll need Cliq's authentication token from Zoho Accounts. Generate an auth token by hitting the below-given
        • Activity or History Log User Login

          Hi Everyone, I have Zoho Customer Portal, which has pages and reports. Is it possible to create 1 field such as true/false to find out users who have opened the customer portal? Like a kind of user activity log. Thank you so much.
        • How to associate a document sent in Zoho Sign with an deal in the CRM?

          Hi, often documents are loaded in Zoho sign and sent for signature. These sometimes are linked to a deal in the Zoho CRM and would be nice to see the status of the document within the CRM. I am aware of the integration, but that assumes that the document
        • Invalid Emails in CRM

          Is there a way to get a report or create a view that shows all email addresses that are invalid for any reason? I keep coming across them and want to ensure that they are flagged with users to update. This is on a custom module.
        • Add Custom Reports To Dashboard or Home Tab

          Hi there, I think it would be great to be able to add our custom reports to the Home Tab or Dashboards. Thanks! Chad
        • Associating an Email from CRM Email Parser to Contact Record via Function

          Is it possible to create a custom function that will associate email records from zCRM's Email Parser functionality to a contact record where specific fields match? Our use-case is that we have service providers using third-party event booking systems
        • Update Client Record based on creation of custom module record

          Hi! Hoping for someone's help with this one. I have a custom module called 'Agreement History. Whenever a deal is won, it creates a new record in this module with associated 'Products' and 'Clients' to track rental history and contracts. What I'm trying
        • Inputting VAT Pre-Registration expenses for first VAT Return

          Hi Zoho, I've just registered for VAT and am setting up Zoho to handle calculations and VAT return submissions. I'm struggling to figure out how to input the last 4 years worth of expenses into Zoho so that they're calculated in the VAT module. When I
        • How to Bring to front the picture?

          I have 2 pictures that have to layers but i can't find bring to front button, Thank
        • setting owner of note when adding via deluge

          My organization has requested the ability to mass update the notes related list in the deals module. Since this can't be done with the mass update feature, I created an update "notes single" line field and created a workflow rule that triggers a function
        • Creating email schedules with custom filters for Pivot/Summary Reports in Zoho Analytics

          Hi Zoho, I have a Weekly Inventory Report that I'd like to send out to various vendors. Is it possible to create an email schedule for each vendor with customized filtering at the scheduling level? Currently, we generate two pre-filtered reports (copies
        • Can Client generate Sales Order by himself?

          My business primarily operates in the B2B sector, and I've observed that my sales team and I spend an excessive amount of time obtaining sales orders from our customers. This is particularly relevant in a product-based business with multiple SKUs. I am
        • Python - code studio

          Hi, I see the code studio is "coming soon". We have some files that will require some more complex transformation, is this feature far off? It appears to have been released in Zoho Analytics already
        • No Responses in PageSense Polls

          Hello everyone, I have launched a poll on two websites yesterday and I think that responses are not being recorded correctly at the moment. I can see the poll on the page and have tried to submit test answers which are not showing on the PageSense report.
        • Automating CRM backup storage?

          Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
        • Count the NUMBER of Contacts for an Account automatically

          Hello. Is there any way Zoho can count the number of CONTACTS for a particular ACCOUNT and have a field in the ACCOUNT module update itself automatically? Currently we use Zoho to administer our language school and the Contacts represent students and Accounts represent Grupos (Classes). It would be very useful for us to have a feature like this enabled, and I can see other similar applications requiring something like this. The solution would be even better if the Contacts met a specified criteria,
        • Join Zoho Meeting only via Web browser and not with Zoho Meeting App

          Dear Zoho team, according to the documentation [1], Zoho Meeting only offers web view for Chrome and Firefox on a desktop. For other browsers and devices, participants can only join a Zoho Meaning with the Zoho Meeting App installed. This is a big hurdle
        • Based onthe multipick list value want to Show in the pick list field

          Based onthe multipick list value want to Show in the Single pick list field Database Region is multipick list if it contain Saudi and UAE then region pick list want to show Saudi and UAE Database Region is multipick list if it contain Saudi then region
        • Email alias per task list so these tasks don't get listed under a 'General' task list that we didn't create nor use

          Using an email alias to add tasks is very good for forwarding emails directly into Zoho Projects however everything gets listed under a 'General' task list which is counter-intuitive. It would be good to have an email alias for each task list so we can
        • Pin multiple columns and adjust column widths in CRM subforms

          Hello all, Subforms act as secondary forms or tables in which you can associate multiple line items to a primary record and thereby ensure more structured and comprehensive data organization. We've made some recent enhancements to subforms. Here's what's
        • Creating Form PDF and Adding to CRM Account

          I have client onboarding forms that I'll be creating in Zoho Forms and these forms will gather information from clients that will help with upcoming projects. I want to know how I can have a pdf created from a from submission and automatically attach
        • Next Page