Automatically close a Task based on workflow rule

Automatically close a Task based on workflow rule

I have a task that is created for every new Deal, and I'm trying to write function that will close that particular Task based on a workflow rule. I'm getting the following error in the function below. I'm new to Deluge so I'm not sure what I'm missing.

Error at line :3 Improper Statement Error might be due to missing ';' at end of the line or incomplete expression Line Number: 3


tRelated = zoho.crm.getRelatedRecords("Activities", "Tasks", dealId);

for each rec in tRelated
{
    tId = rec.get("id");
    tDetails = zoho.crm.getRecordById("Activites", tId);
    tSubj = tDetails.get("Subject"):
    closeTask = tSubj.startsWith("Provide");
    if(closeTask)
    {
        info "Need to close task ID " + tId;
        tMap = map();
        tMap.put("Status","Completed");
        tResp = zoho.crm.updateRecord("Tasks",tId,tMap);
        info tResp;
    }
}

    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

                                                        • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

                                                          Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
                                                        • User Tips: Auto-Create Opportunity/Deal upon Quote Save (PART 1)

                                                          Problem: We use quotes which convert to sales orders but Users / Sales Reps do not create opportunities / deals and go straight to creating a quote. This leads to poor reporting. Implementing this solution improves reporting and makes it easier for users.
                                                        • Custom Function : Automatically send the Quote to the related contact

                                                          Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
                                                        • Function #50: Schedule Calls to records

                                                          Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM
                                                        • Function #37: Create a Purchase Order from a Quote

                                                          Welcome back everyone! Last week, we learnt how to calculate the total number of activities for a lead and further take note of the activity count for particular dates. For instance, from the period of Demo to Negotiation. This week, let's look at a function that lets you create a Purchase Order instantly from a Quote. Business scenario: In any form of business, one of the most important things to do is to document the transactions. Naturally, negotiation, signing an agreement, placing an order,


                                                        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

                                                                                                        • What's New in Zoho Inventory | January - March 2025

                                                                                                          Hello users, We are back with exciting new enhancements in Zoho Inventory to make managing your inventory smoother than ever! Check out the latest features for the first quarter of 2025. Watch out for this space for even more updates. Email Insights for
                                                                                                        • Workdrive connection in Zoho CRM not working

                                                                                                          Hi, in https://crm.zoho.com.au/crm/orgXXXXXX/settings/connections i have set up the connection for WorkDrive which is pretty much setting up the name and the scopes. But I get "WorkDrive API test response: {"errors":[{"id":"F7003","title":"Invalid OAuth
                                                                                                        • 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
                                                                                                        • Inquiry: Integrating In-house Chatbot with Zoho Desk for Live Agent Support

                                                                                                          Hi Team, We are exploring the possibility of integrating our existing in-house chatbot with Zoho Desk to provide seamless escalation to live agents. Our requirement is as follows: within our chatbot interface, we want to offer users a "Talk to Agent"
                                                                                                        • You are forced to store/manage custom functions redundantly | Any solutions?

                                                                                                          Hello there, you are forced to store code (custom functions) redundantly if you want to use the same functionality in multiple departments. I don't understand that you can't define global functions. When I make a change to a function I may have to do
                                                                                                        • Integrating Zoho CRM with Quickbooks Enterprise?

                                                                                                          Does anyone have any experience of integrating Zoho CRM with Quickbooks Enterprise?  The Zoho pages refer to the Quickbooks Premier edition, and I wanted to know if the same works with the Quickbooks Enterprise version.
                                                                                                        • Best Way to Update Subscriber Preferences for an Existing List?

                                                                                                          We currently have a mailing list of over 43,000 contacts in Zoho Campaigns, and we’re looking to segment our list based on subscriber content preferences—things like Free Webinars, Local Training, Store Specials, and New Product Announcements. We’d like
                                                                                                        • in Desk - Why can't I find where to enable multi-branding?

                                                                                                          I'm looking at the knowledge base article & it says to go to settings / general / rebranding / multi-branding. But there's no multi-branding there!
                                                                                                        • Edit a previous reconciliation

                                                                                                          I realized that during my March bank reconciliation, I chose the wrong check to reconcile (they were for the same amount on the same date, I just chose the wrong check to reconcile). So now, the incorrect check is showing as un-reconciled. Is there any way I can edit a previous reconciliation (this is 7 months ago) so I can adjust the check that was reconciled? The amounts are exactly the same and it won't change my ending balance.
                                                                                                        • How to undo a reconciliation?

                                                                                                          I need to update the "Expense Account" field on a bunch of expenses that I've already reconciled.  However, the system will not allow this field the be changed since it is reconciled.  I haven't found a way to remove the reconciliation status for the
                                                                                                        • Edit Reconciled Transactions

                                                                                                          I realize transaction amounts and certain accounts cannot be edited easily once reconciled, but when I audit my operational transactions quarterly and at the end of the year sometimes I need to change the expense account for a few transactions. To do
                                                                                                        • Zoho support Can not send invitation email to portal user

                                                                                                          I try to use Zoho support but have a problem. I don't know why. - When a customer sign up at the portal user they don't receive the invitation email. - When I go to contact manu, choose 1 user and click invite --> they don't receive the invitation email.
                                                                                                        • Quick Create needs Client Script support

                                                                                                          As per the title. We need client scripts to apply at a Quick Create level. We enforce logic on the form to ensure data quality, automate field values, etc. However, all this is lost when a user attempts a "Quick Create". It is disappointing because, from
                                                                                                        • remove()function to remove characters

                                                                                                          Hi there, I'm trying to use the remove function to remove characters from a variable. I have a Lead source that comes in as [Google] or [Facebook] etc. in Flow I need te to remove the square bracket. Tried a function that looks something like this: string
                                                                                                        • CRM HAS BEEN SOOO SLOW For Days 05/15/25

                                                                                                          I have fantastic Wifi speed and have zero issues with other websites, apps, or programs. It takes an excruciatingly amount of time to simply load a record, open an email, compose an email, draft a new template, etc. Am I in a subset/region of subscribers
                                                                                                        • Sharing files without download option

                                                                                                          Hi Team     We want to share folders and subfolder which has files(doc, .PPT , excel and PDF) in zoho Docs. When we share the directory to a member in the organization or external to the organization There are able to download. How do we prevent users from download. Regards Krishna V.K
                                                                                                        • Audio/video quality issues with Zoho Meeting – Any roadmap for improvement?

                                                                                                          Hi Zoho Team, We’ve been using Zoho Meeting for both internal and external meetings, and unfortunately, the experience has been consistently poor. The video and audio quality are so unreliable that it often renders meetings ineffective—especially with
                                                                                                        • Automatic Display the Price from CPQ

                                                                                                          Is it possible to display the discounted price from CPQ that I created for my customer? For example, when the customer selects Product A, instead of showing the default price, it should display the discounted CPQ price.
                                                                                                        • Basic Lookup Field Update Function

                                                                                                          Hi! So I have no idea what I'm doing in Deluge but I need to get a custom function to run On Create or Edit that sets the value of a Lookup Field based on the contents of another field. Seems simple enough, but I have looked through dozens of other similar
                                                                                                        • Introducing Zoho CRM for Everyone: A reimagined UI, next-gen Ask Zia, timeline view, and more

                                                                                                          Hello Everyone, Your customers may not directly observe your processes or tools, but they can perceive the gaps, missed hand-offs, and frustration that negatively impact their experience. While it is possible to achieve a great customer experience by
                                                                                                        • How do I fix this? Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked.

                                                                                                          How do I fix this? Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked.
                                                                                                        • Weekly Tips: Schedule Your Emails with Zoho Mail

                                                                                                          As a business, it is recommended to consider the best time to send an email, taking into account the recipient's time-zone or their work hours to have your email on top of their inbox. Sending an email when your recipient is most likely to check their
                                                                                                        • Data Source Request : More Zoho Marketing Automation and Zoho Pagesense

                                                                                                          I'm currently trying to replicate the reports shown in ZMA for stats over time for individual forms. The reports exist only in ZMA, but I want to use in wider company presentations and can't find the relevant data in Analytics : Example I also note that
                                                                                                        •  【Zoho CRM】サブフォーム内にあとから追加した数式項目を一括して計算させる方法

                                                                                                          皆様のお知恵を拝借いたしたくご相談させてください。 【状況】 任意のタブにすでにサブフォームが設定されており、そのサブフォームを含め、既に数千件のデータが存在している。 【実施したいこと】 新たに数式項目をそのサブフォームに追加して、入力済データのレコードも含めて、その数式項目の計算結果を反映させたい。項目の更新で数式項目をサブフォームに追加しただけでは計算されません。 【わかっていること】 任意のタブのサブフォーム外にあとから数式項目を追加した場合、数式項目を追加しただけでは当然数式項目の計算結果は反映されませんが、以下の方法を実施すると数式項目が計算されます。
                                                                                                        • Zoho Mail - support email

                                                                                                          Hi I sent an email to support more than 48 hours ago and still have not heard back! What's up? How long am I supposed to wait for a replay? Thanks
                                                                                                        • ME SALE ESTE ERROR: No fue posible enviar el mensaje;Motivo:554 5.1.8 Email Outgoing Blocked

                                                                                                          Ayuda!! Me sale este error al intentar enviar mensajes desde mi correo electronico de Zoho! Tampoco recibo correos pues cuando me envia rebotan. Ayuda, Me urge enviar unos correo importantes!! Quedo atenta MAGDA HERNANDEZ +5731120888408
                                                                                                        • Syntax for <criteria> field in zoho.crm.searchRecords() function when the value to check against is a variable?

                                                                                                          I want to search for records in the Tasks module whereby the value of a field (called field1) matches the value stored in a variable in the Deluge script (called variable1). From the sample code in https://www.zoho.com/deluge/help/crm/search-records.html,
                                                                                                        • 554 5.1.8 Email Outgoing Blocked.

                                                                                                          Hi guys, I just singed up for mateusz.nowicki@zoho.com mail and I can't send any mails.. Why? Everytime I try to send something I got error like the one in the screenshot. Please, help me.
                                                                                                        • Why hybrid project management might be the best fit for you?

                                                                                                          Project management techniques are designed to equip teams with proven methods for easy and efficient project execution. While management teams may have apprehensions about adopting the hybrid method of project management, we’ve compiled the top reasons
                                                                                                        • Associating Multiple Work Orders with a Single Invoice in Zoho FSM

                                                                                                          Hello Everyone, Is it possible to associate multiple Work Orders with a single Invoice in Zoho FSM? Best Regards, Subhash Kumar
                                                                                                        • Page - Gauge - Target Values

                                                                                                          Is there a way to make the Target and Maximum values say a formula or query?  For example, total sales for the month = 109 and I want to make my gauge today's percentage.
                                                                                                        • Introducing Rollup summary in Zoho CRM

                                                                                                          ------------------------------------------Moderated on 5th July'23---------------------------------------------- Rollup summary is now available for all organizations in all the DCs. Hello All, We hope you're well! We're here with an exciting update that
                                                                                                        • Add Desk Account comments using Flow

                                                                                                          The triggers and actions for Zoho Desk available in Flow are quite extensive, but I don't see anything related to Account-level Comments. There are actions to add comments to Tickets, Contacts, Tasks, and Topics, but nothing for Accounts. Am I missing
                                                                                                        • Multiple Organizations w/Books

                                                                                                          Does Zoho One allow for more than 1 organization in Zoho Books? I see my default company says "Zoho One Enterprise"next to it but another company says "Trial". We have one company, but multiple lines of business that we keep separate for various financial
                                                                                                        • LOST ALL NOTES AFTER SIGNING IN AGAIN

                                                                                                          I lost all my notes which I prepared from long time after sigingout and signing in again
                                                                                                        • ZML Snippet: Auto Refresh Section

                                                                                                          Is there a way that I can set an auto refresh on each of the ZML snippet only and not the entire page? Just wondering..
                                                                                                        • ERROR 554 5.1.8 Sender Address Blocked code(554)

                                                                                                          We have an email with Zoho ( comercial@bruiser.com.br), but, when we try associate the account in GMAIL, the server shows this message:  554 5.1.8 Sender Address Blocked code(554) I see this error appear when the limits of returns exceded 10 messages,
                                                                                                        • Availability of the Custom Sort Order feature for Windows and Mac platforms??

                                                                                                          Notebook Team, I hope this message finds you well. I am reaching out to inquire about the current status and planned updates for the Custom sort order feature within your application. A year ago, it was mentioned that this feature is supported on iOS,
                                                                                                        • Outgoing Email Being Blocked

                                                                                                          Hi, I have an email ID wherein the outgoing mail are being blocked the user get an email which is as follows: ----------------- Dear User, Mail Outgoing blocked. Reason :Mail rate exceeded limit However, we realize that this might have been unintentional.
                                                                                                        • Important! ZipRecruiter Sponsored Posting Plan Changes in Zoho Recruit

                                                                                                          Greetings, We’re reaching out to inform you about an important upcoming change to the ZipRecruiter Sponsored job board integration within Zoho Recruit. What’s Changing? Starting June 1, 2025, Zoho Recruit will be updated with ZipRecruiter's latest pricing
                                                                                                        • Next Page

                                                                                                        OSZAR »