Power of Automation:: Streamline Associated Teams based on the Task Owner update.

Power of Automation:: Streamline Associated Teams based on the Task Owner update.

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 Associated Team automatically based on the Task owner added.

For example, If User Alex is associated with both the Networking and Central IT Teams, making Alex as Task Owner will automatically update the Task with his Associated Teams. Similarly, when another user is added, their associated Teams will also be updated to the Tasks provided those Teams are part of the Project. 

This can be implemented using
Task custom functions along with Workflow rules.

Custom function code:
 
zuidList = list();
/*          Get all owners and teams.      */
for each  owner in taskOwners
{
zuidList.add(owner.get("id").toString());
}
getTeamUsers = invokeurl
[
url :endPointV3 + portalId + "/teams/users"
type :GET
connection:"*XXXXX*"
];
if(getTeamUsers.get("page_info").get("count") > 0)
{
associtedTeams = list();
for each  user in getTeamUsers.get("team_users")
{
info zuidList + " == " + user.get("zuid") + " : " + zuidList.contains(user.get("zuid"));
if(zuidList.contains(user.get("zuid")))
{
associtedTeams.addAll(user.get("associted_teams"));
}
}
associtedTeams = associtedTeams.distinct();
}
/*   Get all associate teams      */
getAssociatedTeams = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/teams"
type :GET
connection:"*XXXXX*"
];
// info getAssociatedTeams;
 
associteTeam = list();
for each  teamid in associtedTeams
{
associteTeam.add({"id":teamid});
}
/*   Remove teams that are already associated   */
if(getAssociatedTeams.get("page_info").get("count") > 0)
{
for each  team in getAssociatedTeams.get("teams")
{
if(associtedTeams.contains(team.get("id")))
{
associtedTeams.removeElement(team.get("id"));
}
}
}
// info associtedTeams;
/*   Associate teams to project of not added   */
if(associtedTeams.size() > 0)
{
params = Map();
params.put("team_ids",associtedTeams);
info params;
associateTeamToProject = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/associate-teams"
type :POST
parameters:params
connection:"*XXXXX*"
];
info associateTeamToProject;
}
/*   Associate teams to task of not added   */
if(associteTeam.size() > 0)
{
params = Map();
params.put("teams",{{"add":associteTeam}});
info params;
associateTeamToTask = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/tasks/" + taskId
type :PATCH
parameters:params.toString()
connection:"*XXXXX*"
];
info associateTeamToTask;
}
return "success";
 
Make sure to replace XXXXX with Zoho Projects connection link name along with scopes ZohoProjects.tasks.UPDATE, ZohoProjects.teams.ALL. Please find the screenshot of the list of parameters to be mapped for reference.
 
We hope you found this post useful. If you have any questions, feel free to share them in the comments 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

                                                                                                          • Zoho CRM Theme Color?

                                                                                                            I've read multiple articles stating it's possible to change Zoho CRM theme colour (top menu bar) from personal settings menu, however, my zoho has no options for this at all and I've looked everywhere........has this feature been removed? I'm currently
                                                                                                          • US Zipcode Mapping for Sales Tax areas

                                                                                                            In its current form, Zoho Commerce maps tax percentage to different states. Due to the wide variety of tax areas within each state, it would be much better to map sales tax against each individual zip code. In addition, it would be highly desirable to
                                                                                                          • New Emails not being received in Zoho Email account

                                                                                                            I have built a new website for my client, who has an email address like his_address@zohomail.eu (example). When his customers use the Contact Form on his website, the notification emails are sent to an address as his domain name, and the Webhost automatically
                                                                                                          • Custom Function : Copy multilookup field to text field

                                                                                                            Hi, I'm a newbie on function programming, I try to copy text from a multi lookup field named "societe" to a text field named "societe2". I've used this code. In deluge script it seems to work, but when I trigger this function it doesn't work (Societe2
                                                                                                          • Relocating the server from Europe to the UAE

                                                                                                            We are experiencing issues with the sales templates and attempted to collaborate with the companies you recommended to assist with the templates. Unfortunately, we were unable to add their email addresses to our panel due to an error (The ERROR is: USER
                                                                                                          • get statement as file pdf to send in whatsapp template

                                                                                                            hello i have the following url which sends an email with the statement attached sendStatement = invokeurl [ url: "https://www.zohoapis" + dc + "/books/v3/contacts/" + customerID + "/statements/email?start_date=" + start_date + "&end_date=" + end_date
                                                                                                          • I already configured DKIM Records, and other records as well

                                                                                                            I already configured DKIM Records, and other records as well but it is still going like a spam mail
                                                                                                          • No recibo correos

                                                                                                            Buena tarde. No estoy recibiendo correo en Zoho mail, pero si puedo enviar. Como puedo solucinarlo?
                                                                                                          • Email not sending on Iphone on (1) account. Works with the others and set up thesame.

                                                                                                            When I attempt to send an email on one of our accounts on my iphone, It doesn't and. then comes back with an error message.. I've reviewed my other two accounts, and they both work fine on my iphone, it's just this one account.. I've also looked at the
                                                                                                          • Receive the incoming emails of my users

                                                                                                            Guys, I need some help. As an admin, can I receive all the incoming emails from my users?
                                                                                                          • I couldn't create new email "connect@cafeconnet.lk"

                                                                                                            Dear Manager, I want to create new email "connect@cafeconnect.lk" but I can't do that. Please help me for that.
                                                                                                          • didnt add my soho account Mail

                                                                                                            i cant add my soho account arturo@thrivechile.com in Mail (apple)
                                                                                                          • How to apply customized Zoho Crm Home Page to all users?

                                                                                                            I have tried to study manuals and play with Zoho CRM but haven't found a way how to apply customized Zoho CRM Home Page as a (default) home page for other CRM users.. How that can be done, if possible? - kipi Moderation Update: The option to mark a customized
                                                                                                          • Zoho Projects > Workdrive Integration - Where can you find your files in Workdrive?

                                                                                                            Following the instructions here: https://help.zoho.com/portal/en/kb/projects/integration/zoho-apps/articles/zoho-workdrive-integration#Benefits Put a file in the Documents section of a Project. Then Trying to navigate to the Team Folder in WorkDrive and
                                                                                                          • How to set custom Sales Order numbers

                                                                                                            I am trying to create Sales Orders with data from Jotform submissions. Auto number generation is disabled within Books. Whereas the flow Input recognizes the number (40732 in this example), the Output does not. How can I fix this? I'd like the number
                                                                                                          • Zoho desktop problem when using 2 displays

                                                                                                            I have a Microsoft Surface Pro with a second display attached. When I open Zoho mail desktop and place the window on on the second display and I keep the display attached, everything works fine. HOWEVER: when I then detach the second display (the Zoho
                                                                                                          • Assign Multilpe Owners to a Single Deal and Split Revenue Between the Two

                                                                                                            Hello, In our business, it is common for 2 sales reps to co-manage a deal. As such, I would like to add 2 co-owners to a deal within CRM, and then split the revenue generated by a deal between both owners in our analytics. We are currently tracking this
                                                                                                          • Mix and Match Email Plan

                                                                                                            Dear Zoho Sales Team, I hope you’re doing well. I am currently subscribed to Zoho Mail Premium with one account. However, I would like to modify my plan by adding two Mail Lite (10GB) accounts alongside my existing subscription. Could you please confirm
                                                                                                          • Comprehensive guide to add users

                                                                                                            We've received quite a few questions regarding adding users to the Zoho Sprints workspace. So we decided to address it through a comprehensive post covering the locations (modules or tabs) from which you can add your users. Adding users to your workspace
                                                                                                          • How to monitor hybrid projects?

                                                                                                            Hybrid project management sounds great, but, with projects being run on different project management methods, how can we monitor the overall progress and derive insights from them? If you've got this question as well, Zoho Projects Plus’ dashboards have
                                                                                                          • Learning how to customize templates via code and best practices

                                                                                                            Hi! Our developers team want to learn how to edit our template files safely. The last time we messed with these files our site went down for a day and we had to reconfigure it from scratch. What are the best practices to do this? How can we get a template
                                                                                                          • ULAA threat

                                                                                                            My Sentinal One app just killed ULAA as a threat. I reinstalled, killed it again. I opened ZohoOne CRM in Chrome it worked however it was a least 1 if not 2 backsteps from the version I'm using. Is anyone else having this exerience?
                                                                                                          • Seventh Insight - Organize your data using Modules

                                                                                                            The Wheels of Ticketing - Desk Stories Organize your data using Modules What are Modules? Modules in Zoho Desk are powerful organizational tools that facilitate efficient help desk operations. There are eight standard modules, each designed to manage
                                                                                                          • Argument Mapping went missing?

                                                                                                            How can I access the IDs from the mass action button when argument mapping is unavailable or missing?
                                                                                                          • Properly split form fields across report rows?

                                                                                                            Hi all, I’m trying to split file uploads from a form into separate report rows with a shared Title. Example: Form input: Title + File A + File B Desired result: Row 1: Title + File A Row 2: Title + File B Current Logic: In On Created or Edited and On
                                                                                                          • Email Alerts with Affected Flow Details When Deprecating Modules in Zoho Creator

                                                                                                            Dear Zoho Creator Team, We would like to request an enhancement to the module deprecation process in Zoho Creator. 🧩 Current Limitation: Currently, when a module is deprecated by the Creator team: No email notifications are sent. There is no automated
                                                                                                          • Problem importing TSV file: File contains empty string as column header(s).

                                                                                                            I tried importing a TSV file into Books, and got this message: "File contains empty string as column header(s). Please check the content and try again." I've looked at the file I'm trying to import, and the columns all have labels in the first row. Help?
                                                                                                          • How to Integrate Zoho Books with Xero (No Native Connection Available)

                                                                                                            Hi everyone, I’m currently facing an issue with integrating Zoho Books invoices with Xero, as I’ve noticed Zoho does not provide a native integration with Xero at this time. I would like to ask: What are the common or recommended solutions for syncing
                                                                                                          • UPLOAD A CREATED PDF AUTOMATICALLY

                                                                                                            Using the html header pdf+print button, I have managed to find a way to have a user create a pdf using entered form data. Using the schedule button, I can have a "file uploaded" pdf mailed to someone as an attachment. The missing piece is to be able to add the pdf, created in that html page to a file upload field automatically? Right now one has to save it to computer and then upload it in a FILE UPLOAD FIELD. Any help would appreciated !  
                                                                                                          • Short Custom Order

                                                                                                            Hi Everyone, I have question, i create some report use custom short order like below. But this is just show in development mode.... when i publish to production, it is not showing. And this is just showing in full admin mode. Can setting to show roles
                                                                                                          • is there a way to pass whatsapp message to Zoho CRM lead record?

                                                                                                            so I am trying to implement WhatsApp Native Integration to Zoho CRM. What I really need is to pass Whatsapp Number and whatsapp first message to Zoho CRM lead record. yes I can see the Whatsapp Message inside lead detail record like this but as you can
                                                                                                          • How to use CDN with Zoho wesbites.

                                                                                                            I want to use CDN with my zoho- hosted website. I currently have a dot in website. I would seriously like to utilize CDN such as MAX CDN and cloudflare. Its that am not able to change dns with dot in website. Which is a great catch. Today site speed matters a lot both for business or personal sites. I have lot of visitors from different parts of the world and they suggest to make the website more faster. I would be great if I'm able to use dns or may be cdn.
                                                                                                          • Tip of the Week #58– Stay informed by following threads!

                                                                                                            Want to be notified about the activities happening over a specific thread without getting directly involved there? In shared inboxes, not every message requires your immediate response, but that doesn’t mean it’s irrelevant. Without a clear way to keep
                                                                                                          • Zoho CRM 表示が変わった?

                                                                                                            いつからかわからないのですが、本日(6/3)、表示が変わったことに気がつきました。 皆さんの環境でも変わっているのでしょうか? 当方は Zoho CRM Plus で Zoho CRM Everyone 環境です。 ■タブと項目 タブのレイアウト表示名が「標準」から「スタンダード」になっている。 表示だけなので Deluge とか影響はないとは思います。 ■レコード一覧の項目選択の表示 選択すると青色線で囲いが表示されるようになった。 選択しやすくなって使いやすいです。
                                                                                                          • How do we add Google Analytics code to Zoho Bookings scheduling pages or the thank you page?

                                                                                                            We need to track user activity on individual Bookings' pages and/or the thank you pages? How do we do this?
                                                                                                          • please include option for editing attachment name

                                                                                                            Users need the ability to rename an attachment without having to delete the original and then uploading a duplicate just to rename the doc. We need the ability to edit the name of an attachment directly in zoho. dgdlux
                                                                                                          • Lead Created Time Field

                                                                                                            I don't remember doing it but I must have removed the "Created Time" field from my lead module at some point.  Usually it doesn't let you permanently delete fields like this but it is not in my unused fields so it must have been permanently deleted somehow.
                                                                                                          • Notebook Password Recovery?

                                                                                                            I'm a very happy new user of Notebook, but ... my password has fallen from my memory and I am finding no avenue to reset it. How can I reset it to recover access to my notes? Thanks so much, HOC
                                                                                                          • Unable to create a download link for an uploaded Workdrive File

                                                                                                            Hello, I have some custom logic that is working fine to load image files into a Workdrive folder. I'm not having much success however in being able to then set the file as downloadable and retrieving the download link from my custom logic. My code for
                                                                                                          • Data preservation when a Recruiter Admin leaves the organisation and account is deleted

                                                                                                            I can’t find in the documentation on this topic, so asking here. When the Recruiter Admin employee who has done all the hiring work, e.g. publish job postings, updating email notification templates, changing candidate statuses, writing notes, communicating
                                                                                                          • Next Page