Power of Automation :: Autocomplete the Project upon Task closure.

Power of Automation :: Autocomplete the Project upon Task closure.

Hello Everyone,

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 status of the Project to Completed automatically once all the Tasks were closed. This can be achieved using Task Custom Functions along with Workflow rules in Zoho Projects. 
 
Custom function code:-
 
paramMap = Map();
paramMap.put("index",0);
paramMap.put("range",2);
paramMap.put("status","notcompleted");
getAllTasks = zoho.projects.getRecords(portalId,projectId,"Tasks",paramMap,0,"projects");
if(getAllTasks.isEmpty())
{
updateStatusName = "zp.projstatus.completed";
projectDetails = invokeurl
[
url :projectsAPIEndPoint + "/portal/" + portalId + "/projects/" + projectId + "/"
type :GET
connection:"XXXXX"
];
info projectDetails;
info "-------------------------------------";
statusMap = Map();
if(projectDetails != null && projectDetails.get("projects") != null)
{
projectDetail = projectDetails.get("projects").get(0);
layoutDetails = projectDetail.get("layout_details");
projectLayoutId = layoutDetails.get("project").get("id");
info "projectLayoutId: " + projectLayoutId;
projectLayoutDetail = invokeurl
[
url :projectsAPIEndPoint + "/portal/" + portalId + "/module/projects/layouts/" + projectLayoutId + "/"
type :GET
connection:"XXXXX"
];
if(projectLayoutDetail != null && projectLayoutDetail.get("customstatus") != null)
{
projectStatus = projectLayoutDetail.get("customstatus");
for each  status in projectStatus
{
statusMap.put(status.get("status_name"),status.get("status_id"));
}
}
info "statusMap : " + statusMap;
info "------------------------";
if(statusMap.containKey(updateStatusName))
{
updateProjectParamMap = Map();
updateProjectParamMap.put("custom_status",statusMap.get(updateStatusName));
projectDetail = invokeurl
[
url :projectsAPIEndPoint + "/portal/" + portalId + "/projects/" + projectId + "/"
type :POST
parameters:updateProjectParamMap
connection:"XXXXX"
];
info projectDetail;
info "-------------------------------------";
}
}
}
return "success";
 
Make sure to replace XXXXX with the Zoho Projects connection link name along with scopes: ZohoProjects.portals.READ, ZohoProjects.projects.UPDATE, ZohoProjects.projects.READ, ZohoProjects.tasks.READ.

Check this link to learn how to create the connection. Please find the screenshot of the parameters to be mapped and sample Task workflow rules.

With the custom function code provided above, our customer effectively utilised Task custom functions in Zoho Projects which allowed them to automate Project completion, reducing time consumption and in turn 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.


      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • Sticky Posts

          • Schedule Exports for Regular Project Updates

            Tracking project data often means exporting data at regular intervals. Instead of manually exporting data every time, users can schedule exports for Phases, Tasks, and Tasks in Zoho Projects. These exports can be set to run once, daily, weekly, or monthly
          • Set Custom Business Calendars and Holidays for Global Teams

            Managing a project across diverse teams means accounting for more than just tasks and deadlines; it means acknowledging how and when each team actually works. Users might follow different working days or observe region-specific holidays that cannot be
          • 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,
          • Restore Trashed Records Anytime Within 30 Days

            Access the recycle bin from the Data Administration tab under the settings page in Zoho Projects, which gives better control over the trashed data. When records like projects, phases, task lists, tasks, issues, or project templates are trashed, they are
          • 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 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 CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ








                                ご検討中の方

                                  • Recent Topics

                                  • Preview generation in progress for days

                                    I uploaded a video file to Zoho webinar. The file has been showing Preview generation in progress for days. Pls help, why is not approved?
                                  • Workdrive Upload Notification

                                    Is there a way to be notified when someone externally has uploaded files to a folder? The "Unread" tab is really worthless because it shows all files from every directory on the system. I just need an email (or bell at worst) that says "someone has uploaded into <foldername>".
                                  • Workflow for "Expenses" module?

                                    Hi there, over the last 2 years, Zoho Expense has seen tremendous growth and we are happy with it. But, sometimes it is frustrating to see things are being implemented halfheartedly, or so it seems. For example, There is the possibility to create workflows
                                  • Markup instead of discount??

                                    Is it possible to have the discount field on an invoice or estimate be a markup instead? It's the very same functionality that I am looking for - to be able to markup an individual item by either a $ or a % and have that cost added (instead of subtracted) to the item cost.  Currently, I use the tax feature to accomplish this, but it's very awkward to have "Markup 15%" listed after the subtotal. Plus, if I want to markup items at different rates, I end up with several "markup" lines in the totals
                                  • Allow Mapping of Zoho Desk Knowledge Base Categories to Multiple Departments in Zoho SalesIQ

                                    Hello Zoho Team, We hope you're doing well. We would like to request an enhancement to the Zoho SalesIQ integration with Zoho Desk, specifically regarding the way Knowledge Base (KB) articles are mapped and displayed across departments. Current Limitation
                                  • Creator roadmap for the rest of 2022

                                    Hi everyone, Hope you're all good! Thanks for continuing to make this community engaging and informative. Today we'd like to share with you our plans for the near future of Creator. We always strive to strike a good balance of features and enhancements
                                  • Announcing new features in Trident for Windows (v.1.27.4.0)

                                    Hello Community, Trident for Windows is here with exciting new features to elevate your communication and enhance productivity. Let’s dive into what’s new! Smart Sign-in. You can now sign in to Trident with Smart Sign-in. With this new addition, you can
                                  • Inactive Items - Make Less Prominent by Default

                                    Currently, when one marks an Item as "Inactive", it really doesn't do much of anything to hide it or get it out of the way. Search and reporting within Finance should, by default, hide inactive Items from standard reports, searches, etc. If one specifically
                                  • Add Lookup Field in Tasks Module

                                    Hello, I have a need to add a Lookup field in addition to the ones that are already there in the Tasks module. I've seen this thread and so understand that the reason lookup fields may not be part of it is that there are already links to the tables (
                                  • Time Entry : Auto fill fields Hours minutes seconds

                                    Hello world, Do someone know a script (for workflow rules) which fill automatically fields hours spent, minutes spent, seconds spent when we fill Executed time and End time Formula should start from (End time - Executed time) Thx in advance
                                  • Zoho Forms - edit the settings of the Zoho CRM field to change the integration with CRM

                                    I've created a Zoho CRM field in my form to pre-populate selected CRM details into the form, following the instructions here https://help.zoho.com/portal/en/kb/crm/integrations/zoho/zoho-forms/articles/zoho-forms-crm-integration#Step_2_-_Add_Zoho_CRM_Field_in_the_form
                                  • Ability to add notes to an appointment and add notes/attach docs to a consultation

                                    As an idea for the future, it would be helpful to be able to add notes to an existing appointment--there is a place to add notes for the customer, but I don't see one for the appointment. It would also be helpful to be able to add notes or attach documents
                                  • Im trying to white list domain dynamically in zoho desk extension

                                    Im trying to white list domain dynamically in zoho desk extension. But it show error Error: {errMsg: 'No entry found in plugin-manifest whiteListedDomains for requested URL'} syntax "config": [ { "displayName":"Shopify Admin API access token ", "name":
                                  • Zoho Payroll: Product Updates for India - May 2025

                                    This May, we are glad to unveil new capabilities in Zoho Payroll that simplify your payroll activities. Here's the list: Let Employees Choose Their Tax Deduction Method for One-Time Payments Calculate variable earnings based on percentage of CTC Carry
                                  • Bulk Update Tasks/Task Lists/Milestones

                                    Is there a way to bulk update tasks/task lists/milestones? We have several projects that are in the same template, and our staff complete them tasks at a time - and would like to go in an bulk update all related tasks/task lists/milestones at once. But you can't do this. I remember in an old version you could export your tasks, update the excel doc and reimport. But it doesn't seem like that option is available anymore. Can someone provide a solution/idea? Otherwise we are spending a lot of time
                                  • Sync failed: Invalid Date value

                                    Hi, I have a local .sqlite database. After importing one table through the Databridge, and produced my dashboards, I cannot sync. I get an error regarding the date column: [Line: 2 Field: 4] (2018-07-12) -ERROR: Invalid Date value The data found at the
                                  • Office 365 is marking us as "bulk"

                                    All of a sudden (like a couple of days ago) all of our customers who are on Office 365 are getting our mails in their junk email. This is not the case with Gmail or other random mail servers, nor between us. We got a 10/10 score on mail-tester.com. Also,
                                  • Zoho Assist

                                    Hi, We are using zoho assist unattended access in some windows server 2012 and recently the agent lets you connect but not let you do anything on the remote machine. Sometimes you can click on something but nothing happens. There's a issue with this new
                                  • Modify workflow from "ON CREATE & EDIT" to "ON CREATE" only

                                    Salut, Is there a way to easilly change my choice of trigger of workflow from on create & edit to on create only, or do I have to re-do the whole worklow from scratch ? Sylvain
                                  • Access custom modules via API?

                                    Is it possible to access a custom module in Zoho Inventory via the API? I can not find any reference to this in the API docs.
                                  • Welcome to the Zoho Service Plus community

                                    Hey everyone, We are excited to welcome you to be a part of the Zoho Service Plus community. Here's a quick overview of what Service Plus is all about and how the community can help us work together. What's Zoho Service Plus? Zoho Service Plus is a unified
                                  • Restrict Zoho Cliq Webinars and Announcements to Admins Only

                                    Hi Zoho Team, We hope you're doing well. We would like to raise a feature request regarding in-app announcements in Zoho Cliq, such as the recent webinar popup about the Cliq Developer Platform: While these announcements are useful, they are not always
                                  • Track ZohoForm Conversion using Postmessage event

                                    Hi, I’ve been using a third-party lead tracking tool to capture leads from my website along with their source. Earlier, with the HubSpot form, the third-party script was able to detect the postMessage event that iframe forms typically send back to the
                                  • Share Notebook with group created in Zoho One

                                    I have created a group in Zoho One for a section in my company. Is it possible to share a notebook with that Zoho One Group? Currently, it seems only possible to share to emails. Unfortunately for large teams, this will mean we are constantly having to
                                  • Create Tasks in arbitrary Zoho Project triggered from CRM [Zoho Flow]

                                    Community, hello What I'm trying to do is to create a Zoho Project when a Deal is created in CRM and then to be able to add tasks to this Project also from Zoho CRM with the trigger (Blueprint/ Workflow). I succeeded in creating Project using Zoho Flow,
                                  • Outlook Add-in security times out needs to login 10 times a day

                                    hi we've just switched the Zoho. We use Azure SSO. All users have stopped using it. Sometimes it asks every 5 minutes. What should I lot at to solve this?
                                  • Simplify Zoho API integration with Deluge’s invokeAPI task

                                    Hello all! Happy New Year! As we kick off 2025, we’re excited to share some of the latest updates to enhance your Deluge experience. While Deluge already offered robust API integration capabilities, we’ve taken it to the next level with the introduction
                                  • Simplify Zoho API integration with Deluge’s invokeAPI task

                                    Hello all! Happy New Year! As we kick off 2025, we’re excited to share some of the latest updates to enhance your Deluge experience. While Deluge already offered robust API integration capabilities, we’ve taken it to the next level with the introduction
                                  • Attention: Display Issues on Chromium Browsers with Intel® Core™ Ultra Processors

                                    Dear Customers, We've recently identified a display-related issue that may affect some of our Zoho Assist users, particularly technicians using devices powered by Intel® Core™ Ultra Processors. What’s Happening? If you're running a Chromium-based browser
                                  • [WEBINAR] Smooth year-end closure with Zoho Books (KENYA)

                                    Hello there, This webinar is for all Kenyan businesses looking to wrap up their financial year smoothly! Join our free session to learn how Zoho Books can simplify your year-end process. What to expect from this webinar: - All the latest updates in Zoho
                                  • Is the "schedule 10 mass emails/module" limit a per user or per organization limit?

                                    For scheduling emails out of Zoho CRM, there is a 10 scheduled mass emails per module limit according to Zoho documentation (https://help.zoho.com/portal/en/kb/crm/faqs/emails/articles/how-to-schedule-mass-emails-in-zoho-crm). Is this limit per user or
                                  • How do I show file uploads in my Zoho Creator approval workflow?

                                    As far as I can tell I'm not able to add the file upload field to the approval workflow show fields list. As a work around I'm making a plain text field that links to the files URL. But I'm not sure how to get a link to that url that will me to preview
                                  • Zoho Payroll US?

                                    Good morning, just reaching out today to see if there's any timeline, or if there's progress being made to bring Zoho Payroll out to be available to all states within the USA. Currently we're going through testing with zoho, and are having issues when
                                  • Zoho Bookings - variable appointments

                                    Hello, I am looking to see if its possible for zoho bookings to recognise booking slots in the calendar or a way to do this. I would like appointments only booked in at certain times of the day and this could vary per host. I have provided a calendar
                                  • Limited review (/questions) for Bookings 2.0

                                    Hi all, I'm writing this review of Bookings 2.0 for two reasons: 1) it may be of interest to others, and 2) I'd like to be corrected if I'm wrong on any points. It's a very limited review, i.e. the things that have stood out as relevant, and particularly
                                  • Best Practices - Extensions for Zoho Finance Suite

                                    With Sigma, the extension developer platform, you can create custom extensions that enhance the functionality of Zoho Finance apps like Zoho Books, Zoho Billing, Zoho Inventory, Zoho Expense, and Zoho Invoice. Here’s how to get started: Sign up: Create
                                  • QR code image is not exported in PDFs

                                    The new QR code field works fine when I include it in a report template and I choose the print option: https://creatorapp.zoho.com/<username>/<app_link_name>/record-print/<report_link_name>/<record_ID>/ But when I try to save the document to a .pdf file
                                  • Zoho Form to Zoho Form Integration

                                    I've created an application form that asks for references. I would like the submission of the application form to trigger a form to the reference using the email id and name entered in the first form. In the reference form that is triggered I need to
                                  • CRM: related table using module queries, are links possible?

                                    Hello. I was exploring the possibility of using a module query to get a filtered related list. For example, I'm using a Canvas custom details page and if an account has an open deal I'd like it to appear at the very beginning of the account page, with
                                  • 【開催報告】名古屋 ユーザー交流会 Vol.1 2025/6/6 Zohoで社内システム管理を実現するユーザー事例の共有

                                    ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 6/6(金)に名古屋 ユーザー交流会 Vol.1を開催しました。当日は11名の皆さまにご参加いただきました。 本投稿では、当日実施したセッションの様子と投影資料をご紹介します。会場にお越しいただけなかった方も、ぜひご覧ください。 ユーザー活用事例セッション:Zoho CRM Plusによる引合~見積~受注までのプロセス統合 日本アイリッヒ株式会社の清水裕さんに登壇いただきました。以下に一部抜粋して掲載しています。ぜひご覧ください。 セッションの後半は、清水さんの環境を投影いただき、実際の画面上で操作しながらご説明いただいたため、本記事では掲載しておりません。予めご了承ください。
                                  • Next Page