Mass Action Button Script

Mass Action Button Script

Hi all,

I've been trying to search a lot of places for a solution on how to do a button placed at the "Mass Action Menu" and thus only updating multiple CHOSEN records at once. After finding no success whatsoever, I decided to just run and test whatever I can think of and finally, it worked; thanks to no easily accessible resources by Zoho ( you guys really need to improve this).

Right, to the function.

In the function you are about to write, you can edit the Arguments. Let's say for example we're dealing with the Deals module, then what you want to do is add an argument mapping to the Deal ID field. I would suggest putting the mapping value as a plural (i.e: DealIDs) because we will be dealing with multiple records most of the time.

Now, what would happen when the button is clicked when multiple records are chosen is, it would return the IDs of the Deals record like this:

1243331222221004|||1243331222221005|||1243331222221006

Why? Hell, I have no idea. But this is a string value. We have to convert this string into a list and that's simple. Simply write this line:
  1. if(DealIDs.contains("|||") == true)
    {
  2. DealIDs = DealIDs.toList("|||");
  3. }
  4. else
  5. {
  6. DealIDs = DealIDs.toList();
  7. }
This will change the string value to a list. And why do I do the conditional thing is because there is a possibility that only one record is chosen and in that case, there will be no "|||" in the returned value.

Then, simply do the "for each" thing, for example;
  1. for each DealID in DealIDs
  2. {
  3. updateStage = Map();
  4. updateStage.put("Stage","Closed_Won");
  5. updateDeal = zoho.crm.updateRecord("Deals",DealID,updateStage);
  6. }
  7. return "The deals are updated successfully";
And it should work just fine. Hope this helps. And hey, if you have a better way, please please please tell me, I'm not a programmer so my work might not be optimal.

Cheers!

      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

          • Kaizen #198: Using Client Script for Custom Validation in Blueprint

            Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
          • Kaizen #226: Using ZRC in Client Script

            Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
          • Kaizen #222 - Client Script Support for Notes Related List

            Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
          • Kaizen #217 - Actions APIs : Tasks

            Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
          • Kaizen #216 - Actions APIs : Email Notifications

            Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are

          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

                                  • Clone entire dashboards

                                    If users want to customize a dashboard that is used by other team members, they can't clone it in order to customize the copy. Instead they have to create the same dashboard again manually from scratch. Suggestion: Let users copy the entire dashboard
                                  • Zoho Cliq REST APIs v3 : A complete guide to what's changed and why 

                                    APIs are not just consumed by a developer with numerous automations and a series of open browser tabs. They are parsed by LLMs, fed into agent pipelines, and auto-completed by AI coding assistants that have zero tolerance for inconsistency. A verb tucked
                                  • Zoho desk extension update custom field

                                    Hi all, I'm trying to update a custom field in my zohodesk extension. But the documentation is fairly unclear. The custom field is named "testveld". The api name is cf_testveld I'm trying to update it like this: ZOHODESK.set('ticketForm.cf_testveld',
                                  • Zoho Expense Auto Tracking Sync Fails "Request Timed out"

                                    I am testing this feature to move away from MileIQ who significantly raised their prices. It seems to be tracking but it is not syncing unless I manually perform a resync under "Drives pending Sync". I am not sure what would be causing this, as some drives
                                  • How to show product cards in your chatbot

                                    Hey everyone, If you are using Guided Conversations to help customers find products, you have probably run into this problem: the bot gives customers a list of options, but they still have no idea which one to pick. There will be no images, no specs,
                                  • Zoho Projects Coming to CRM Teamspaces

                                    Availability: The US DC Standard Edition is now available. It will be rolled out to customer accounts in all DCs in phased manner. Hello all, You are probably already familiar with Teamspaces, the dedicated workspaces where teams organize the CRM modules
                                  • Canva Integration

                                    Hello! As many marketing departments are streamlining their teams, many have begun utilizing Canva for all design mockups and approvals prior to its integration into Marketing automation software. While Zoho Social has this integration already accomplished,
                                  • Editing Draft Fixed assets

                                    I have a few Fixed Assets still currently in Draft Status that I need to edit. I need to edit the Fixed Asset Type, the Fixed Asset Account, the Accumulated Depreciation account and the Depreciation account. Once I have done it and attempt to "Save as
                                  • Zoho Status Pages: Our Domain Has Changed — Here's What You Need to Know

                                    We're making a change to how you access Zoho Status Pages. Our status page domains have been updated to provide a more consistent and region-specific experience across all locations. If you have the old domain bookmarked or referenced anywhere — emails,
                                  • The Social Wall: May 2026

                                    Hello everyone, This month, we're excited to introduce two powerful features designed to help you create more engaging content and streamline your team's communication workflow. Adding audio via Zoho Social Audio is one of the biggest drivers of engagement
                                  • SalesIQ : How to disable "Idle chat handling" ?

                                    Hello SalesIQ Team. SalesIQ, How to disable "Idle chat handling" ? I would like to disable the option “Automatically close chats that have been idle for a specified amount of time.”
                                  • Zoho Webinar - Sharing System Audio (NOT AVAILABLE)

                                    Hi, We are having a serious problem with Zoho Webinar. In the webinars we run, we very often share the audio from a video we are streaming directly from YouTube or other applications. Until recently we were using Zoom, but as we use other Zoho applications
                                  • Customising Outcome drop down

                                    Is it possible to customize the drop down list for appointment outcomes?
                                  • Automate Backups

                                    This is a feature request. Consider adding an auto backup feature. Where when you turn it on, it will auto backup on the 15-day schedule. For additional consideration, allow for the export of module data via API calls. Thank you for your consideration.
                                  • Partial payments for retainer invoices

                                    When a customer does not pay the entire retainer invoice there is no way to apply a partial payment. PLEASE add this function.
                                  • Custom Display Field for Lookup Dropdowns in Zoho CRM

                                    Could Zoho CRM support changing the display field in lookup dropdowns, like Zoho Creator does? This would make it much easier to select the right record by showing a more useful field instead of only the default one. It would improve speed, clarity, and
                                  • Create custom field in multiple modules

                                    I am trying to create some custom fields that will be in both leads and contacts module without having to create them separately and then mapping them. How is that performed? it is too time-consuming to create 20+ fields and then do the same thing in a different module when they carry the same info. The idea is that when we get a lead from web site, there are items that we capture and once that lead is a client and moved to Contacts, that info should come over. So trying to find an easy way to create
                                  • Add Specific Identification as an Inventory Costing Method

                                    --- Business Context We are a security systems distributor handling high-value, serialized products such as IP cameras, NVRs, and RAID storage systems. Each unit is uniquely identified by a serial number and arrives in separate shipments at varying purchase
                                  • Creator Portal Page Customization Issues

                                    I have been using Creator to make Portals recently. Yesterday, I created a new portal and noticed that the page customization editor ("Open Builder") was different. Using the new page builder, I was able to customize and add an image to the various sign
                                  • Zoho Books - Budget Creation and Reporting Tags

                                    Is there a way to create one budget for multiple reporting tags. For example, if my company has 4 different divisions I would like to be able to enter in what the budgeted revenue for each division is and view that information in 1 budget. I would then
                                  • Razorpay + Zoho Billing + Zoho Books Integration

                                    Please help us set up this integration.
                                  • Why is Approval Hierarchy Not Available for the Expenses Module in Zoho Books?

                                    Hello, I noticed that Zoho Books allows us to configure approval workflows and approval hierarchies for modules such as Bills, Vendor Credits, and Invoices. However, the same approval hierarchy option does not seem to be available for the Expenses module.
                                  • Zoho Mail Android app update - Traditional Chinese language and contact nickname support

                                    Hello everyone! The Zoho Mail Android app now includes support for the Traditional Chinese language. You can change the language to Chinese (Traditional) from the Settings module of the Zoho Mail app. You can also view the nickname of the contacts within
                                  • Get Cliq Meetings in my O365 calendar

                                    Hi, we are currently evaluating to replace the Teams Messaging and Meetings with Cliq. We currently still have all our email and calendars in O365. What i want to achieve is, to create a (ZOHO) meeting from Cliq and have this meeting added to my Outlook/O365
                                  • Latest update in Zoho Meeting | On-demand webinars

                                    Hello everyone, We’re excited to introduce our new on-demand webinar feature, you can now provide pre-recorded sessions that your audience can access immediately, no need to wait for scheduled sessions. Benefits of On-demand webinars : Scheduling flexibility
                                  • Replicating Zoho Books "Accounts" and "Accrual Transactions" in Analytics via API: Best Endpoint Strategy?

                                    Hi everyone, I am working on a custom integration where I need to programmatically replicate two specific tables in Zoho Analytics via API on an hourly schedule: Accounts and Accrual Transactions. Those two tables sync from Zoho Books. (Note: I am aware
                                  • Subform edits don't appear in parent record timeline?

                                    Is it possible to have subform edits (like add row/delete row) appear in the Timeline for parent records? A user can edit a record, only edit the subform, and it doesn't appear in the timeline. Is there a workaround or way that we can show when a user
                                  • On-prem version of Zoho Desk

                                    Is there an on-prem version of Zoho Desk available for enterprise customers if we have additional aspects of security that aren't covered with current legal and data security terms?
                                  • SPAM Filter cleanup

                                    I was under the impression that the SPAM filter would automatically clear itself, however re-reading the message it says: What does this mean? How often does this get emptied automatically?
                                  • Hyphen in domain names

                                    I am facing problems while hard-coding an email address with a - in the domain name. I get the error Lexical error at line 4, column 24. Encountered: "@" (64), after : "" I recall that Zoho Domains also had an issue with hyphens and I think the issue with the sendmail api is the same. Could this be fixed?
                                  • Latest updates in Zoho Meeting | Breakout rooms and End to end encryption

                                    Hello everyone, We’re excited to share a few updates for Zoho Meeting. Here's what we've been working on lately: Introducing Breakout Rooms for enhanced collaboration in your online meetings and End-to-end encryption to ensure that the data is encrypted
                                  • Latest updates in Zoho Meeting | New End of session notification to remind everyone about the session end time

                                    Hello everyone, We’re excited to share a new feature for Zoho Meeting ; End of session notification. With this new setting, you can choose to remind all participants or only the host about the scheduled end time of a meeting. You can also choose when
                                  • #9 Win the Job First

                                    For many businesses, the first document that goes out isn't an invoice. It's a document that creates ample space to negotiate, discuss requirements, align expectations, and ultimately win the deal. The whole of the business world calls it a Quote or,
                                  • How Can AI Agents Improve E-commerce Operations Efficiency?

                                    I’ve been thinking about this question recently: as e-commerce operations become more complex, can we use AI Agents to improve daily efficiency? Many e-commerce teams need to handle product management, order follow-up, inventory checks, customer replies,
                                  • Is it possible to create a meeting in Zoho Crm which automatically creates a Google Meet link?

                                    We are using Google's own "Zoho CRM for Google" integration and also Zoho's "Google Apps Sync" tools, but none of them provide us with the ability to create a meeting in Zoho CRM that then adds a Google Meet link into the meeting. Is this something that
                                  • Export Zoho Books Invoice - PDF API

                                    How to Download Zoho Books PDF Files Using Zoho Books API -------------------------------------------------------------------------------------- Hello everyone! If you are looking for a way to download Zoho Books PDF files using the Zoho Books API, you've
                                  • Marketing Automation/Campaigns confusion questions and integrations

                                    ​I am pulling my hair out yet AGAIN due to the lack of true integration between zoho apps - Why can't we use Campaigns and Marketing Automation at the same time? if they are truely seperate apps, then we should be able to use both for what they were intended,
                                  • Tip #75- Exploring Technician Console: Power Options- 'Insider Insights'

                                    Hello Zoho Assist Community! Welcome to the very first community post of June, and we are kicking things off with a feature that gives technicians complete control over a remote machine without ever leaving their session: Power Options. What are Power
                                  • Windows agent 2026_M07 release notes

                                    Agent Version: 2026.4.15.0 Release date: 1 June, 2026 Issue fix: Streamlined overall process flow and fixed bugs that delayed or prevented proper functioning of Task Scheduler feature. Enhancements to Multi Monitor view under varying network load scenarios.
                                  • Show Categories Directly When Clicking the Knowledge Base Button in SalesIQ Chat Widget

                                    Hi Zoho SalesIQ Team, I would like to submit a feature request regarding the behavior of the Knowledge Base button in the SalesIQ chat widget. Current Behavior: When a visitor clicks the Knowledge Base (KB) button in the chat widget, they are first taken
                                  • Next Page