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 #197: Frequently Asked Questions on GraphQL APIs

            🎊 Nearing 200th Kaizen Post – We want to hear from you! 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.
          • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

            Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
          • Kaizen #193: Creating different fields in Zoho CRM through API

            🎊 Nearing 200th Kaizen Post – We want to hear from you! 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.
          • Client Script | Update - Introducing Commands in Client Script!

            Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands
          • Kaizen #165 : How to call Zoho CRM APIs using Client Script

            Welcome back to another exciting Client Script post! In this post, we will discuss one of the most frequently asked questions: How do you call Zoho CRM APIs from Client Scripts? In this kaizen post, 1. Ways to make calls to Zoho CRM APIs using Client

          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

                                  • Admin asked me for Backend Details when I wanted to verify my ZeptoMail Account

                                    Please provide the backend details where you will be adding the SMTP/API information of ZeptoMail Who knows what this means?
                                  • Action requested: Retain your sales journey configuration in Path Finder

                                    Dear Customers, We hope you're well! As you might know, we're completely overhauling our journey management suite, CommandCenter, and are in the last leg of it. As a means of getting ready to go live, we will be announcing a series of requests and updates
                                  • search layout in new version

                                    Hello where is the menu for customizing search fields (module search layout) in the new zoho version (2016) ?? thanks nono
                                  • Show all items making up the composite item in transactions

                                    Dear Zoho, Currently, when we select a composite item in Zoho Inventory for a transaction, we do not receive a breakdown of the individual items that make up the composite. This makes it challenging for our team to accurately pick, pack, and ship the
                                  • Zoho Marketplace Analytcis

                                    Hi Team, Our Zoho Marketplace Dashboard is not showing any data. What do you think we could do?
                                  • if i have zoho one can i upgrade some of my staff from crm to crm plus within my organisation?

                                    if i have zoho one can i upgrade some of my staff from crm to crm plus within my organisation? Or because I have many licenses of ZOHO ONE , IF I upgrade some staff to ZOGO CRUM PLUS. they will not be on the same organisat
                                  • The problem with Commerce ownership changing

                                    Hi, I am changing the ownership of the company and trying to delete the previous user-owner. I changed the owner of the company from user Tatiana to user Eugene. Eugene is the owner of the organization. It's OK. I am now trying to remove the user Tatiana.
                                  • Secondary Emails

                                    I am having issues deleting a secondary email address from a couple of our users and need help. When in Directory, manage email addresses, I click the trash icon by the email address and confirm I am trying to delete the email. I click continue and I
                                  • Search Feature Now Broken

                                    I have many hundreds of notes on Zoho Notebook but now when I search for a keyword, I only get 30 results maximum. This is unacceptable and yet another feature that has become broken on this quickly deteriorating software. Please fix immediately.
                                  • Kaizen #121 : Customize List Views using Client Script

                                    Hello everyone! Welcome back to another interesting Kaizen post. In this post, we can discuss how to customize List Views using Client Script. This post will answer the questions Ability to remove public views by the super admin in the Zoho CRM and Is
                                  • Zoho Books | Product updates | June 2025

                                    Hello Users, We’ve rolled out new features and enhancements in Zoho Books, from the option to record advances for purchase orders to dynamic lookup fields, all designed to help you stay on top of your finances with ease. Introducing Change Comparators
                                  • Widget Upload to CRM Fails with “Page Not Found” – Even with Correct Index Path

                                    I'm building a simple widget to export Contact data to CSV in Zoho CRM, triggered via a custom button. The widget uploads cleanly, appears in the widget list, and is successfully assigned to a Contact detail view via a custom button. But when clicked,
                                  • Account disabled

                                    I have an issue I need help with. Whilst trialing ZOHO CRM I created the following: Account1 (-------------) using m__ame@m__rg___s__i__.___.__ and 2 personal emails Account2 (-------------) using a personal email and 2 users _al__1@______________._o_.__
                                  • How can we manage the tags in ticket

                                    Allowing agents to use Tags indiscriminately can cause havoc. We could not find tag management where 1. The admin can create Tags beforehand for use by Agents 2. Permission can be allocated which roles/profiles can use existing tags or add new tags 3.
                                  • Feed Notifications filter?

                                    I'd like to have filter settings for Feed Notifications just like we have for Personal Email. If someone dumps a bunch of files into a project, we get a notification for every file!
                                  • Custom fields and filters for Timesheet

                                    HI Zoho Projects team. IT would be great and useful if we can add custom fields to the Timesheet design And is needed more options for filtering the timesheet dashboard, like "Milestones" and task list asociated to the record. Thank you
                                  • Online Payment Fees

                                    We don't take many online credit card payments so the merchant service provider (PayPal) charges us the 2.9% fee for processing the amount. I would like the ability for the fee to be automatically added to the total amount for "ease of payment". We'd
                                  • Text snippet

                                    There is a nice feature in Zoho Desk called Text Snippet. It allows you to insert a bit of text anywhere in a reply that you are typing. That would be nice to have that option in Zoho CRM as well when we compose an email.
                                  • How do I rename the dropdown that contains a form and a report?

                                    I want to rename this, but I can't find how
                                  • Filtering two fields

                                    Hoping somone can assist, i am trying to create a report to show values from two different fields. e.g I have Field 1 Field 2 In some records, fields 1 and 2 are both "yes"; in other records, only one of the fields has the value "yes". Can we generate
                                  • Image Resolution Restriction Option in Zoho Forms File Upload

                                    Hi Zoho Forms Team, Greetings, We would like to request a feature enhancement for Zoho Forms regarding the file upload field. Currently, Zoho Forms allows us to restrict the file size of uploaded images, but not the image resolution (in megapixels). This
                                  • Shopify integration

                                    I need to integrate Shopify with Zoho Books
                                  • Unable to Convert Quote to Invoice – Integration Active but User Not Recognized

                                    I’m having trouble converting a Quote into an Invoice inside Zoho CRM, even though the Zoho Finance Suite integration is enabled (Invoices, Quotes, Products, and Customers are all checked), and my user is an Admin in both Zoho CRM and Zoho Books, using
                                  • Owner drawings

                                    I entered an owner’s drawing transaction in 2023 but it’s still appearing on 2024 books. Is that supposed to happen? Or should Is there an additional step? I prefer for this transaction not to appear.
                                  • Running Balance in Account Statement.

                                    Running balance should come by default in the accounting statements but in ZOHO we need to customize every time to get the running balance in accounting statement. I did not understand, when the bank account statement opened from Bank Menu can show the
                                  • Importing Invoices

                                    Dear Team I used the enclosed csv file to import some invoices and it worked fine. I had to delete the file and when I am trying to re-upload it, I am getting the error for invoice number and branch "Resource does not exit." I tried a number of different
                                  • Enhance "Send Cliq Notification" Action in Zoho Desk Workflows (and also add Happiness Rating Support)

                                    ello Zoho Desk Team, We hope you're doing well. We’d like to submit a feature request regarding the “Send Cliq Notification” action available in Zoho Desk workflows — specifically in workflows triggered by Happiness Ratings, but also relevant to all workflows
                                  • Treatment of Non-Refundable Income after cancelling an Invoice

                                    A customer made part payments of 30,000 for an invoice 0f 100,000, and then he is unable to pay up the remaining and has asked for a refund. As per company policy, he can only get 75% of the amount paid, which is 22,500. The remaining 7,500 is non-refundable
                                  • I need refund

                                    I have purchased the Zoho Book standard plan; I had the impression that I would get the purchase > Bill feature. After purchasing, I found that billing is not included in the Zoho standard plan. I immediately canceled the subscription. I love the product,
                                  • Handling identifiers during an import

                                    Importing your data When importing data into an application, it is crucial to prevent data loss or duplication. These types of errors can hinder the development of a clean and well-organised database, which is essential for effective data management and
                                  • Creating Deposit Invoices

                                    Hi, we are a company that does project based work with a request at the begining of each project for a deposit payment. At the moment we are creating invoices for the deposit and an invoice for the completion of the project, however they are completely
                                  • Using Another Field Value for Workflow Field Update

                                    I'm trying to setup a Workflow with a "Field Update" action on the Lead module, but I would like the new value to actually be taken from a DIFFERENT Field's on the Lead record (vs just defining some static value..) Is this possible? Could I simply use
                                  • Unify Overlapping Functionalities Across Zoho Products

                                    Hi Zoho One Team, We would like to raise a concern about the current overlap of core functionalities across various Zoho applications. While Zoho offers a rich suite of tools, many applications include similar or identical features—such as shift management,
                                  • Marketer’s Space - WhatsApp Pricing Update: What Marketers Need to Know and Do

                                    Hello Marketers, Welcome back to Marketer’s Space! WhatsApp made changes to their pricing model on July 1, 2025, moving from conversation-based pricing to a per-message pricing model. This week’s post focuses on what these changes mean for your WhatsApp
                                  • It's time to say goodbye to Zoho Recruit for me.

                                    Hello, I have been a Zoho Recruit user since 2013. The tool has evolved, with a better UI, new features and so on. The pricing is still a great asset too. BUT, that being said, important features are not coming fast enough. I tried to share my point of
                                  • change subscription within customer portal

                                    Would be great for the customer to be able to change their own subscription (or restart existing one) within the customer portal. Also, would like to be able to have early termination fee on subscriptions if canceled early.
                                  • How to make the add-on optional at the time of subscription?

                                    The scenario is this, we have a service which has optional add-ons. Like the customer who purchased the subscription may or may not want to get the add-on. In our case if the customer choose the addon we have monetary benefit. In case the user does not
                                  • Naming a Visitor in SalesIQ Messes up First and Last Name

                                    When I go to Visitor History to manually associate a visitor with a known contact, I press the pencil symbol next to the system-generated ID number. I enter first and last name, then email. Looks good so far. However, when it syncs with CRM, first name
                                  • Unable to add attachments to knowledge base anymore

                                    I have been adding articles to knowledge base in Zoho Desk (as part of Zoho One). Today suddenly i found that I am unable to upload and attachments to the articles. I get the following error: "Attachment couldn't be added." I have uploaded the screenshot
                                  • Advanced factors for multiple scoring rules: Now with Zia scoring automations for all modules

                                    Greetings all, We're happy to offer improved scoring features by adding extra scoring factors, including Zia Scores, in our multiple scoring rules (MSR) feature. These new factors—which empower existing traditional scoring factors—include criteria for
                                  • Next Page