Power of Automation :: Automatically archive your inactive Projects

Power of Automation :: Automatically archive your inactive Projects

Hello Everyone,


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. 


Requirement:


We have received a very specific requirement from our customer that the Projects should be archived automatically if they are inactive for 6 months.

We had accomplished this requirement using Schedule functions which allow you to execute custom functions based on a specified schedule such as hourly, daily, weekly, or monthly. This feature can be used for recurring actions, like generating monthly reports or sending automated emails to portal users about upcoming public milestones or deadlines without relying on specific events.


Create a connection for Zoho Projects service with the scopes “ZohoProjects.Portals.ALL & ZohoProjects.Projects.ALL” to replace ‘projects’ with the connection name. Click this link below to learn how to create the connection. Attached a screenshot of the Arguments & schedule details.


Script to be used


// Get the current date

current_date = zoho.currentdate;

// Subtract 6 months from the current date

six_months_ago = current_date.addMonth(-6);

// Output the result

info six_months_ago;

getAllProjectsParam = Map();

getAllProjectsParam.put("custom_view_id",xxxxxxxxxx); // place the custom view id here

getAllProjectsParam.put("is_gantt",false);

getAllProjectsParam.put("page",0);

getAllProjectsParam.put("sort_by","DESC(undefined)");

getAllProjectsParam.put("per_page",100);

//last modified time field id here

getAllProjectsParam.put("filter",{"criteria":{{"cfid":"1945138000000042003","criteria_condition":"less_than_or_equal","value":{six_months_ago}}},"pattern":"1"});

getProjectResponse = invokeurl

[

url :"https://projects.zoho.com/api/v3/portal/" + portalId + "/projects_cv"

type :GET

parameters:getAllProjectsParam

connection:"projects"

];

if(getProjectResponse != null)

{

projects = getProjectResponse.get("data").get(0).get("entities");

    for each project in projects

    {

projectId = project.get("id");

param = Map();

param.put("status", "archived");

updateProjectResponse = invokeurl

[

url :"https://projects.zoho.com/restapi/portal/" + portalId + "/projects/" + projectId + "/"

type :POST

parameters : param

connection:"projects"

];

info updateProjectResponse;

    }

}


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

      Zoho Desk Resources

      • Desk Community Learning Series


      • Digest


      • Functions


      • Meetups


      • Kbase


      • Resources


      • Glossary


      • Desk Marketplace


      • MVP Corner


      • Word of the Day


        • Sticky Posts

        • 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
        • Tip 37: Time Log Restriction in Zoho Projects

          Timesheet in Zoho Projects helps you big time in entering log hours for the tasks and issues and approving them. Now, with the new Time Log Restriction option, you can set daily and weekly log hour limits. You can restrict users from entering extra log hours than the permissible limit. The limits are restricted to 24 hours per day and 168 hours per week by default based on business hours. To customize, navigate to Task & Timesheet settings under Portal Configuration in Zoho Projects setup and enable
        • Organize and Track Phases with Phase Custom Views

          Phase Custom Views let you filter and display phases based on specific criteria. This helps you focus on what’s most relevant for you and your team. Filter phases using criteria such as budget, status, and more. Share views with specific users or teams
        • Create Your Own Issue Management System

          Effective issue management is a cornerstone of project success. Every bug or issue, no matter how small, needs to be tracked and resolved in time to maintain project momentum. In this post, we’ll explore how an issue management system in Zoho Projects

        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

                                • Recurring Events Not Appearing in "My Events" and therefore not syncing with Google Apps

                                  We use the Google Sync functionality for our events, and it appears to have been working fine except: I've created a set of recurring events that I noticed were missing from my Google Apps calendar. Upon further research, it appears this is occurring
                                • How can the direct link to a ticket be created from ticket #?

                                  Our agents will be using ZDesk but we will have to create direct link to tickets in another ERP by providing the Desk Ticket # Is there a way to create the direkt links from the ticket # alone? Do we have to use the API to get the direct links?
                                • Multiplying Weight of product by Quantity

                                  I am facing an issue with creating a report that consolidates the total sales volume in kilograms. I have already specified the weight for each product. I have also aggregated the total sales quantity. The key question is: how can I create a report that
                                • Confirmation prompt before a custom button action is triggered

                                  Have you ever created a custom button and just hoped that you/your users are prompted first to confirm the action? Well, Zoho knows this concept. For example, in blueprint, whenever we want to advance to the next state by clicking the transition, it is
                                • Frontal interview scheduling - room availability in office using Google Workspace?

                                  Hi, We're using Zoho Recruit as our ATS and Google Workspace as our email, calendar and resources management. We want to use the interview feature to schedule an in-person (frontal) interview with the applicants. How can we sync the room resources availability
                                • Add and Remove Agents from Departments and Groups in Zoho One

                                  Hi Zoho Flow Team, We hope you're doing well. Currently, Zoho Flow provides an action to add an agent to a group in zoho one, but there is no action to remove an agent from a group or a department. Another action that we find missing is the option to
                                • Explication sur comment mettre en place des règles d'affichage ou "layout Rules"

                                  J'ai passé plus d'une heure hier avec le support et je n'ai rien compris !! Je suis lecteur assidu des guides (je "RTFM") qui ne sont absolument pas orienté "client" chez Zoho, et je tiens à le rappeler ici . Dans la documentation on m'indique un cas
                                • Introducing Hiring Pipeline for Vendor Portal

                                  Keeping vendors informed about candidate progress is often challenging, leading to communication gaps and repeated follow-ups. To address this issue, we've released an update to the Vendor Portal feature that lets you choose to display candidates' hiring
                                • Unlocking New Horizons: A Year in Review

                                  As we bid farewell to 2024, let's celebrate and revisit the key highlights of the year. From adding a new edition to cross-platform enhancements, here’s a roundup of all the feature updates designed to simplify accounting, optimize financial management,
                                • Address Grabber function for Zoho

                                  I converted from ACT to Zoho. With ACT, I used an add-on called AddressGrabber to scrape the contact information from leads that I buy and contact information contained on emails and websites and directly add it as a new lead or contact. Does anyone know
                                • Integrate zoom with zoho bookings please; or add optional times in zoho meetings

                                  Just like events - these online meetings like zoom need to be integrated with zoho bookings, and there needs to be option for customer to book a time slot. It should not be dictated by CRM user.
                                • Add Owner to deluge-created module record note

                                  Is it possible to include the "owner" aka "creator", of a Note when creating it via delulge? This sets "superadmin" as the Note creator. I need to override it. notemap = Map(); notemap.put("Parent_Id",program_contact_id); notemap.put("Note_Content",program_contact_data.get('Note'));
                                • Directly Edit, Filter, and Sort Subforms on the Details Page

                                  Hello everyone, As you know, subforms allow you to associate multiple line items with a single record, greatly enhancing your data organization. For example, a sales order subform neatly lists all products, their quantities, amounts, and other relevant
                                • Unique and Random IDs in Zoho Forms: Organize and Secure Your Data Efficiently

                                  When it comes to form submissions, organizing and identifying entries effectively is crucial. Zoho Forms offers two versatile ID generation options for submissions: Unique ID and Random ID. Each serves distinct purposes, providing flexibility to meet
                                • Sort By Date - Deluge

                                  I have the following code, which normally works to sort calls by created time. Every once in a while, it doesn't work and something sneaks through in the wrong order and I can't figure out why. calls = zoho.crm.searchRecords("Calls","(Owner:equals:" +
                                • Iteration through a list - Coming up against a "Failure to update function" error

                                  Hi there! I've been attempting to get a deluge script working and am running into an error that I have been unable to resolve. The error I am getting is Failed to update function Error at line :18. Improper Statement. Error might be due to missing ';'
                                • Can you modify "Last Activity Time" in deluge? If so what's the field name?

                                  I need to perform some bulk modifications on records in the Leads module, but I need to avoid changing the "last activity time" or "date modified" because I am using those fields to filter and sort leads for follow-up action. I cannot find an answer anywhere
                                • How do I define a weekend

                                  I noticed the default for weekends does not seem to include Saturdays. How can i define weekends to include both Saturdays and Sundays? Thank you.
                                • 【Zoho CRM】ポータル機能のアップデート

                                  ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 今回は「Zoho CRM アップデート情報」の中からポータル機能のアップデートをご紹介します。 今回の機能アップデートにより、CRMのポータルへのログインがより簡単にできるようになりました。 【目次】 SAMLベースのシングルサインオンについて ポータルへのアクセスリンク送付について 今回のアップデートにより、アイデンティティプロバイダー(IdP)を利用している組織において、SAMLベースのSSO(シングルサインオン)を有効化できるようになりました!
                                • Getting error during inserting a record in form of zoho people using zoho api

                                  import requests import json # Set your access token and Zoho People API base URL access_token = '1000.XXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX' api_base_url = 'https://people.zoho.in/people/api/' # Set the form name and data to be inserted form_link_name
                                • UI Arabic

                                  can i change the member portal UI to arabic in zoho community?
                                • Resume template to include profile photo

                                  Hi, We would love the Resume Template to be able to include their profile photo. How can this be done? Miriam
                                • Marking a form as 'done'?

                                  Hi! I've got a form that staff fill in when moving stock from location to location. I see the entries they've sent across and I input them into my stock control system. Is there a way to mark a form as 'done'? So that I know which entries I've input,
                                • Zoho CRM - best way to search an account and assign to a deal

                                  Hi Everyone I am looking for some advice. I want to find the best way to complete the below steps. We have a deal and once it reaches a certain stage we need to allocate a supplier / vendor to this deal along with the salesperson. I want to add (ideally
                                • How to easy change layout in existing records in Deals?

                                  Hello, So far i have used only 1 layout in Deals. I have about 1000 records. Now i want to make new layout. So i have 2 layouts: Layout Old (1000 records) Layout New (0 records) How to easy change layout from Layout Old into Layout New for existing records?
                                • Zoho Rating

                                  When I close a ticket, the zoho system automatically sends an email to the customer for them to leave a rating. When they leave a rating, the ticket re-opens and I have to close it again. When I close it again, the zoho system sends the customer an email
                                • Zoho GC Flow is not showing in IM Channels

                                  I have added my social IM channels in zoho desk. Created a GC Flow to automate conversations. But Guided conversations are not showing in any platforms I have chosen; WhatsApp Instagram Messenger Web (Business Messaging) In the flow I mentioned these
                                • Sharing Knowledge Base articles across multiple departments

                                  It would be useful to share some Knowledge Base articles across multiple departments where they are applicable, rather than having to go into other departments to find the article you're looking for. For example. Our reception uses the 'Admin' desk whereas our IT guys use the 'Support' desk, however both divisions would find KB articles about our company intranet useful. Reception does not have access to the support desk, so cannot see articles created in the Support KB. Perhaps you could install
                                • Contacts marked as Spam are shown as Contacts in tickets.

                                  Hi Zoho, If a ticket is marked manually as Spam you get an option to set the contact as Spam as well. It would be great if there was another option to delete this Contact. This would be based on the understanding that it wouldn't be marked automatically
                                • Is possible to use ${webhookTrigger.payload.street==null?"No street":${webhookTrigger.payload.street}} for to detect inline a null parameter

                                  Hi Team I need to know if it's possible to evaluate inline the following parameter, with the objetive to detect a null value ? I would like to use ${webhookTrigger.payload.street==null?"No street":${webhookTrigger.payload.street}} Regards, Pablo
                                • Real Estate CRM

                                  How can I tailor my CRM for real estate? I had seen an image where the CRM included property tabs.
                                • Issue with Bulk Edit Triggering Function Multiple Times in Zoho Report

                                  In our Zoho report, we have observed an issue where executing a function during a bulk edit operation runs the function multiple times—once for each selected report entry. This behavior is causing errors due to overlapping or redundant executions. Our
                                • Is there a Kanban view of Tasks across all Projects?

                                  As the title indicates, I could use a Kanban view of my Tasks across my Projects. If it's there, I don't see it. If it isn't there, I'd like to submit this as a feature request. Thx.
                                • Set recurring tasks in Zoho Support?

                                  Hello,   We use the task function in Zoho Support to set reminders for "due dates" of important events, such as lease expirations, etc. Is it possible to set some of these as recurring yearly? As of now, we have to reset every task manually after one year. Is there a way to have it reset automatically?   Additionally, is there a way to import a list of tasks and their dates into Zoho Calendar? I have not been able to do it from Zoho Support to Calendar. I tried exporting tasks from Zoho Support,
                                • Help - How Can I Enter a Hourly Rate (Global Cost) for our Team for Profitability Reporting?

                                  Hi everyone, I'm hoping someone can help as I am at a loss and am quite shocked (if true) at the lack of functionality in Zoho Books. We run a company in which we do hourly jobs for clients and we bill based on the hours of work completed. Projects are
                                • Schedule a regular backup

                                  In CRM I have a regular backup setup. I cannot find an option to backup Desk? I would like to take a backup before I test syncing products between CMR and Desk.
                                • Limit who can submit a support ticket to your site?

                                  Does anyone have a use case for needing to limit who can submit tickets via your help portal? Some of our customers want to have end-users view our knowledge base articles and see tickets their IT groups have submitted but they do not want end-users to
                                • Is there a way to request a password?

                                  We add customers info into the vaults and I wanted to see if we could do some sort of "file request" like how dropbox offers with files. It would be awesome if a customer could go to a link and input a "title, username, password, url" all securely and it then shows up in our team vault or something. Not sure if that is safe, but it's the best I can think of to be semi scalable and obviously better than sending emails. I am open to another idea, just thought this would be a great feature.  Thanks,
                                • Allow us to disable the Reopen Ticket button after a ticket is closed

                                  Disabling the Reopen Ticket will allow us to have more control over the ticket's flow. According to support, this is currently not possible. Please add this to let us, the customers, mold the ticketing system into something that we can use for our business
                                • How to Enforce Mandatory Fields (Category/Sub-category) Before Closing a Ticket?

                                  Hi, I'm currently using Zoho Desk and encountering an issue where agents are able to close tickets without filling out mandatory fields, specifically Category and Sub-category. I’ve already set them both as a mandatory field, but it can still be bypassed
                                • Next Page