Power of Automation::Automate the process of re-opening the Milestone once Task is re-opened.

Power of Automation::Automate the process of re-opening the Milestone once Task is re-opened.

Hello Everyone,

Here we are again with another requirement that was fulfilled utilizing the Task custom functions.

In general, 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.

So, many of us would have explored the Gallery custom function - Milestone Autocomplete that will automatically update the status of the Milestone as completed once all the Tasks and Issues associated to the Milestone is closed.

Similarly, here is a custom function code which would update the Milestone status as Reopen when any of the Tasks status that is associated to the Milestone is updated to Reopen

Custom function code:

endPointV3 = "https://projects.zoho.com/api/v3/portal/";
milestoneStatusIds = List();
milestoneStatusNames = List();
milestoneParameter = Map();

// Get milestone layout details

milestoneLayoutDetails = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/milestones/layouts"
type :GET
connection:"xxxxxxxxxx"
];
milestoneCustomFieldDetails = milestoneLayoutDetails.get("section_details").get(0).get("customfield_details");
for each  milestoneCustomFieldDetail in milestoneCustomFieldDetails
{

if(milestoneCustomFieldDetail.get("api_name").equalsIgnoreCase("status"))
{
milestoneStatusIds = milestoneCustomFieldDetail.getJSON("picklist_details");
milestoneStatusNames = milestoneCustomFieldDetail.getJSON("picklist_valuemap");
}
}

// Milestone re-open status id

indexOfReopen = milestoneStatusNames.indexOf("Reopen");

// Get milestone details

milestoneResponse = zoho.projects.getRecordById(portalId,projectId,"milestones",milestoneId,"xxxxxxxxxx");
if(milestoneResponse.containKey("milestones"))
{
milestoneStatusId = milestoneResponse.get("milestones").get(0).get("status_det").get("id");
}
else
{
return "Couldn't update status of none milestone";
}
if(milestoneStatusId != milestoneStatusIds.get(indexOfReopen))
{
milestoneParameter = Map();
milestoneParameter.put("milestone_ids",{"" + milestoneId + ""});
milestoneParameter.put("update_fields",{"CUSTOM_STATUSID":"" + milestoneStatusIds.get(indexOfReopen) + ""});
updateMilestoneDetails = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/milestones/" + milestoneId + "/updatefieldvalue"
type :POST
parameters:toString(milestoneParameter)
connection:"xxxxxxxxxx"
];
}
return "success";

Make sure to replace xxxxxxxxxx in the above code with the connection name. Screenshot of the list of parameters to be mapped is attached for reference.


By utilising the custom function provided above, we have embraced automation as an alternative to manually adjusting the Milestone's status to "Re-open."

We hope you found this post useful. If you have any questions or wondering if your requirement could be met using custom functions, feel free to share them in the comments section below. 

    Access your files securely from anywhere







                          Zoho Developer Community






                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts



                                                          • 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,
                                                          • 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
                                                          • 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:


                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources


                                                                                            Zoho Writer Writer

                                                                                            Get Started. Write Away!

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

                                                                                              Zoho CRM コンテンツ





                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • ZDK Error

                                                                                                            I get this error when trying to trigger a CRM Function from Client Script: Uncaught (in promise) ZDKError: {"code":"NOT_ACTIVE","details":{"api_name":"activate_client_from_prospect"},"message":"api is inactive for the given custom function","status":"error"}
                                                                                                          • "Disbursing product components in phases, monitoring them, and displaying only the final product."

                                                                                                            i have a product composed of multiple components, and these components will be delivered to the customer in batches. However, the final invoice should only show the finished product. How can I issue (or release) the components and track their delive
                                                                                                          • Followed Subtasks doesn't show up in the Subtasks Section

                                                                                                            I have a task assigned to me now in the same task, there's a subtask and I am added as the follower on that task Even though I am a follower I still don't see that in the subtasks section The view permission for the profile is Related It's supposed to
                                                                                                          • Tip #39- Strengthen account security with Multi-factor Authentication (MFA) – ‘Insider Insights’

                                                                                                            Securing your organization's data begins with verifying that only the correct individuals have access to it. One of the simplest yet most effective ways to accomplish this is to enable Multi-factor Authentication (MFA) within Zoho Assist. MFA introduces
                                                                                                          • Automate timeout chat tracking with Workflows in SalesIQ

                                                                                                            With our feature-packed Nova release, Workflows has become one of the most powerful tools in Zoho SalesIQ. They let you automate follow-up actions when key events occur, such as when a chat ends, a visitor leaves a bad/good rating, or a lead is updated.
                                                                                                          • Mass edit / Mass update products

                                                                                                            Hi, Is there any way to mass update or bulk edit product fields in Zoho Inventory?
                                                                                                          • Automatic Verification of IMAP Integration Status

                                                                                                            Our sales staff have their O365 email integrated with CRM, over time this integration requires re-authentication via the UI. I can manually check the integration status by accessing Settings -> Channels -> Email -> Email Sharing -> "Configuration Type"
                                                                                                          • Tip of the Week #68– Share and access files faster with Zoho WorkDrive extension.

                                                                                                            Have you ever wasted time searching for the right file to attach to your emails—or worried whether the right people could access it? Without proper sharing settings, files might end up inaccessible to teammates or, worse, visible to people who shouldn’t
                                                                                                          • CV-Library: The Newest Source Booster in Zoho Recruit!

                                                                                                            We’ve expanded your sourcing toolkit — CV-Library, one of the UK’s largest and most trusted online job boards, is now available as a Source Booster in Zoho Recruit. This gives recruiters instant access to millions of UK-based candidate profiles, all without
                                                                                                          • Zoho AI Translate Task as Rest API

                                                                                                            I cant find any docs on how to use Zoho AI Translate Task from a rest api call https://www.zoho.com/deluge/help/ai-tasks/translate.html I am working on a custom Widget and I dont think I can execute zoho deluge ai translate task from a custom widget.
                                                                                                          • Is there the possibility to book less than 250 customer portal users?

                                                                                                            If you use the Creator, which is included in Zoho ONe, you can create a customer portal and give access to a maximum of 3 external people / customers, right? On the Creator website I saw that you can add 250 users for 100€/month. However, we don't need
                                                                                                          • Display Parts custom fields in the Work Order

                                                                                                            Hello, I see that is it possible to add custom fields in the Parts module. Would it be possible to also add those custom fields in the Work Order Module under Parts? This would be very useful for customer who want to showcase more information about parts.
                                                                                                          • Unable to edit Saved Estimates

                                                                                                            We are facing issue with editing the price or discount for a saved estimate for nearly 1 week.
                                                                                                          • Translation Blueprint & Picklists with Custom Values

                                                                                                            Hello everyone, I downloaded the translation file and I'm not finding the blueprint transitions. Does this means that the transitions cannot be translated? Also, the picklist values to be translated in the document are not the same that are actually used the in module. For exemple, for my lead module, the picklist values for Lead Status are : Not-contacted, contacted, junk and lost lead. In the translation document (English to French), this is what I see: PicklistValues.Leads.Lead_Status.Contact
                                                                                                          • How to create a custom sales signal?

                                                                                                            I want to create a custom sales signal for a custom module. is it possible to create one? If anyone know please let me know
                                                                                                          • Only show products in offers based on lead source

                                                                                                            We work with several lead sources, each with their own products and different pricing. For example, one product might have two or three different prices. Sometimes, when creating a quote, the wrong product is accidentally selected. Is there a way to only
                                                                                                          • Narrative 7 - The importance of data sharing

                                                                                                            Behind the scenes of a successful ticketing system - BTS Series Narrative 7 - The importance of data sharing Definition Data sharing requires a commitment to preserving the integrity and dependability of shared data throughout its entire lifecycle. This
                                                                                                          • TrueSync regularly filling up my local disk

                                                                                                            Seems that WorkDrive's TrueSync randomly starts filling up my local hard drive space. None of the folders have been set as "Make Offline" but still it seems to randomly start making file offline. The settings of the app is so minimal and is of no real
                                                                                                          • Check out in Meetings

                                                                                                            Why there is no check out in Meetings of Zoho CRM, very difficult to track
                                                                                                          • Issue with Zoho Projet

                                                                                                            Zoho Project on all the cellphones of my customer is crashing. He has mixed brands (Samsung and Pixel). Everything is fine on website and mobile website. Could not reproduce the issue in workshop using Samsung/Pixel/iPhone Uninstallation of Zoho Project
                                                                                                          • SecurePass email English language issue -- please hire someone to correct the English language issues sprinkled throughout your interface

                                                                                                            I wrote previously about some incorrect English in your SecurePass offering. After about six months it was corrected. I have never revoked permission before today and just discovered another language mistake that was not corrected. When you revoke a SecurePass
                                                                                                          • Published Components

                                                                                                            @zoho team, Checking if we can add a password for the public links as we have non-licensed users
                                                                                                          • Zoho Creator customer portal users

                                                                                                            Hi, I'm in a Zoho One subscription with our company. I'm running a project now that involves creating a Zoho Creater application and using the Zoho Creator Customer Portal.  At most we need 25 customer portal users. In our Zoho One plan we only get 3
                                                                                                          • Please Enable Snippets for Agents Adding Comments

                                                                                                            Snippets and templates are currently enabled for agents when they use the reply functionality. There is currently no way to add a template or snippets when an agent comments. This is really weird. Our agents don't use the reply functionality, only the
                                                                                                          • Tip of the Week - Extracting Data from JSON Columns

                                                                                                            Let's say you are importing a CSV or Excel file into Zoho Analytics. What if the file contains a few columns in JSON format? This is where Zoho DataPrep, embedded right within Zoho Analytics, comes in handy. This week's tip explains how to extract data
                                                                                                          • Deluge UI Updates

                                                                                                            Are there any updates planned for the Deluge UI in Zoho Desk? It feels quite dated and lack-lustre after you've spent some time in the CRM Deluge UI.
                                                                                                          • Zia Agents - Follow Ups

                                                                                                            It would be nice to have Zia Agents do follow ups. A lot of times agents are trying to schedule things with users and they say "can we set your printer up tomorrow?" and the user never says anything. A way to have a personalized reminder to the user automatically
                                                                                                          • Hide Agents name in Ticket Responses in "My Area"

                                                                                                            We were able to hide the agents name in the emails, however, the customer is able to see which agent has responded to a ticket in the thread of emails by going into their Help Center thread. Is there any way we can hide that information?
                                                                                                          • Option to Automatically Update Extensions

                                                                                                            Hello Zoho Desk Team, We recently received an email notifying us about an extension update that must be done manually. We’d like to request a feature that allows extensions to be updated automatically without requiring manual intervention. This would
                                                                                                          • Embed Report with Auto Height

                                                                                                            Hello Developers, When we embed report within Page, we are getting one awesome feature to adjust the report height. "Auto" and "Custom' height. This "Auto" option works well when we have no records. But I want to embed report based on some conditions
                                                                                                          • Zoho Payroll: Product Updates - August 2025

                                                                                                            This month’s updates to Zoho Payroll bring enhanced efficiency and smarter features, simplifying payroll management for users in India, UAE, KSA, and US. Read on to explore how these updates can streamline your workflow. Filter Pay Runs by Type (India,
                                                                                                          • Numerical Rating for Interviewer Assessments

                                                                                                            Introducing Numerical Rating, a powerful new addition to interviewer assessments that brings precision and flexibility to candidate evaluations. ✅ What is Numerical Rating? Numerical Rating lets interviewers assign a score for each question in the assessment,
                                                                                                          • User Tips: Adding Multiple Products (Package) to a Quote v2.0 (with Client Script)

                                                                                                            This solution is an improvement on the original idea which used deluge. My solution was posted in the comments are: https://help.zoho.com/portal/en/community/topic/adding-multiple-products-package-to-a-quote The updated version uses client script instead
                                                                                                          • Are downloadable product available in Zoho Commerce

                                                                                                            Hi all. We're considering switching to Zoho Commerce for our shop, but we sell software and remote services. Is there a features for downloadable products? I can't find any information about this. Thank you very much Alice
                                                                                                          • Need Faster Help? Try Live Chat Support

                                                                                                            Hello there, We understand that sometimes, whether you’re facing an issue, exploring a feature, or need quick clarification, sending an email and waiting for a response just doesn’t cut it. You need answers, and you need them now. That’s exactly why we
                                                                                                          • Custom image for each contact using merge tag

                                                                                                            Hi, I'm wondering if it's possible to set up an email campaign to display a different image for each contact using a custom field for the image url. I tried inserting custom html: <img src='$[UD:APP_IMAGE_URL||]$'/> but the editor seemed to reject this and did not actually add anything to the email template. Has anyone got any ideas? cheers, Jeremy
                                                                                                          • Comment Reactions like a Thumbs Up

                                                                                                            Can we please have the ability to emoji react on comments or at the very least, thumbs a comment up? Literally every other project management system out there can support this and it is very much needed to just acknowledge a comment instead of completely
                                                                                                          • Zoho Mail Search Engine Sucks

                                                                                                            Hello There! I really like all the features of Zoho Mail and I believe is way better than Gmail except for the Search Function. I believe Zoho Mail has a very poor search function, if you misspelled a word in the search box, Zoho Mail won't display any
                                                                                                          • Allow Subtasks and Task Lists to have their own Layout

                                                                                                            I'd like to have the ability for subtasks and task lists to have their own layout.  A subtask for us doesn't require all the fields that a parent task has.  The subtask seems cluttered with all the extra fields. Within a project Task List had different purposes.  I'd like the task layout to be different for some task lists.
                                                                                                          • How to update Customers in Zoho Books through Zoho Flow?

                                                                                                            Updating customers in Zoho Flow using a "update customer" action is deleting contact persons in Zoho Books.
                                                                                                          • Next Page