Power of Automation :: Automatic removal of project users once the project status is changed.

Power of Automation :: Automatic removal of project users once the project status is changed.

A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate complex tasks and calculations.


Let us take the below User Requirement - 


Once the project status is changed to “On Hold" all the Employee and Manager profile users should be automatically removed from that respective project. 


The code below will help you to achieve the above requirement. 


endPointV3 = "https://projects.zoho.com/api/v3/portal/";

endPoint = "https://projects.zoho.com/restapi/portal/";

userParameter = Map();

userParameter.put("type",1);

userParameter.put("view_type",1);

userParameter.put("per_page",200);

userParameter.put("page",1);

usersResponse = invokeurl

[

url :endPointV3 + portalId + "/projects/" + projectId + "/users"

type :GET

parameters:userParameter

connection:”**********”

];

users = usersResponse.get("users");

for each  user in users

{

if(user.get("role").get("name").containsIgnoreCase("employee") || user.get("role").get("name").containsIgnoreCase("manager"))

{

dissociateUsersResponse = invokeurl

[

url :endPoint + portalId + "/projects/" + projectId + "/users/" + user.get("id") +"/"

type :DELETE

connection:”************”

];

}

}

return "success";


Likewise, any profile users can be removed from the project using Custom Function

Creating custom functions in Zoho Projects is straightforward and well-documented. Zoho provides a range of built-in functions that you can use as a starting point, and you can also easily define your own functions using Zoho's scripting language, Deluge. Give it a try and see how it can save your time and boost your productivity!

 

Watch this space for more such custom function codes. 




      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

          • Automate Timesheet Approvals with Multi-level Approval Rules

            Introducing Approval Rules for Timesheets in Zoho Projects. With this automation, teams can manage how timesheets are reviewed and approved by setting up rules with criteria and assigning approvers to handle submissions. Timesheet, when associated to
          • Accessibility Spotlight Series - 1

            Every user interacts with products differently, what feels intuitive to one may be challenging for another. Addressing this, accessibility is built into Zoho Project's design philosophy. This helps users navigate and perform actions with ease irrespective
          • Customize User Invites with Invitation Templates

            Invitation Templates help streamline the invitation process by allowing users to create customized email formats instead of sending a one-size-fits-all email. Different invitation templates can be created for portal users and client users to align with
          • Zoho Projects - Q3 Updates | 2025

            Hello Users, The final quarter of the year 2025 has begun, and we at Zoho Projects are all set with a plan. New targets to achieve and new milestones to reach, influenced by the lasting imprint of the past quarter. 2025's Q3 saw some new features and
          • 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,

          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 コンテンツ






                                ご検討中の方