How to get a list of selected records into a button-function? Here is how!

How to get a list of selected records into a button-function? Here is how!

So, you might know already how to get a button on a page somewhere and perform actions with a function when pressed, but how about a button that only works with the records you selected in the list view?


The button selected is a custom button in the modules section of in this example, Accounts. Create the button and choose "List View - Mass Action Menu".

Choose to create a new custom function and set the parameters to requestParams with value to Request -> Parameters. This is done by entering the # sign and then change from Accounts to Request in the dropdown box that appears.

Now you have a custom function that will pass info from your button and do something with it. Here is a code example of that:

  1. idList = requestParams.get("ids").toList(",");
  2. for each  id in idList
  3. {
  4. count += 1;
  5. }
  6. return "You selected " + count + " records from " + requestParams.get("moduleDisplayName");

Now when you press the button you will see the popup appear with the return value of that function.



For those who will say "There is an error when there are no ids in the requestParam", don't worry, since the button will not appear when nothing is selected, the code works just fine and we don't need to declare count.

    Access your files securely from anywhere

          Zoho Developer Community




                                    Zoho Desk Resources

                                    • Desk Community Learning Series


                                    • Digest


                                    • Functions


                                    • Meetups


                                    • Kbase


                                    • Resources


                                    • Glossary


                                    • Desk Marketplace


                                    • MVP Corner


                                    • Word of the Day



                                        Zoho Marketing Automation
                                                • 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
                                                • 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,
                                                • Function-2: Round-Robin assignment of records

                                                  Welcome back folks! Last week, we saw how to update sales commission in quotes using a custom function. This week, let's see an interesting use case asked by many of you - auto-assignment records by round-robin method. Business scenario: Right now, the solution allows you to auto-assign leads from web form and imported lists. Let us look at a need where you want to auto-assign leads from in-bound calls in a round-robin method, across modules. Prerequisite: You must create a permanent record in the


                                                Manage your brands on social media



                                                      Zoho TeamInbox Resources

                                                        Zoho DataPrep Resources



                                                          Zoho CRM Plus Resources

                                                            Zoho Books Resources


                                                              Zoho Subscriptions Resources

                                                                Zoho Projects Resources


                                                                  Zoho Sprints Resources


                                                                    Qntrl Resources


                                                                      Zoho Creator Resources



                                                                          Zoho Campaigns 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

                                                                                                  • Missing "Email Authentication" tab

                                                                                                    Backstage is alerting users about "Unauthenticated Domains" with a large prompt in the backend. It adds a link to learn more. On this tutorial page, it shows where to find the "Email Authentication" tab in this screenshot. However, in our Backstage, that
                                                                                                  • Integration with Moodle

                                                                                                    Greetings, I hope find all doing well and safe. I've recently returned to using Zoho Flow after a break and was hoping to connect my WooCommerce store with Moodle, the world's most widely used learning management system. My goal was to automatically enroll
                                                                                                  • Zoho Desk -> Zoho Analytics : Where is the field for "Layout" ?

                                                                                                    I have many different layouts on my helpdesks and I want to be able to identify the stats for each one, however I can not file the field in the raw data from the Zoho Desk datasource. I thought it might be under "Tickets" but there is nothing. There is
                                                                                                  • Task status - completed - other options

                                                                                                    I have a dumb question I know i can make custom statuses for the tasks - but is there anyway to make additional "completed" statuses like for instance if i have a task "call back customer" and i leave a vm for them to call back marking it "completed -
                                                                                                  • Task module and related-to field

                                                                                                    In modules other than the Task Module I can add several lookup fields to provide a variety of relationships. In the Task module lookup fields are not available. There is only one "related to" field which I want to use for Company. But I want to relate
                                                                                                  • Zoho Assist "Agree and Download" Button "Greyed Out" ("Light Blued" Out)

                                                                                                    Anyone else having issue where support clients are unable to click "Agree and Download" to access the client so that we can provide remote support? This is for "on demand" support via accessing the support page and entering the support key and name. This
                                                                                                  • Add Lookup Field in Tasks Module

                                                                                                    Hello, I have a need to add a Lookup field in addition to the ones that are already there in the Tasks module. I've seen this thread and so understand that the reason lookup fields may not be part of it is that there are already links to the tables (https://help.zoho.com/portal/en/community/topic/custom-fields-on-task-module).
                                                                                                  • migrating from Zoho Invoices (CRM) to Zoho Books

                                                                                                    Good day, I was wondering if there was a easy way to migrate all the quotes and invoices from Zoho Invoices CRM to Zoho Books. We plan to move to using Zoho Books in a few weeks and would like to have all the quotes and invoices from the past 3 years
                                                                                                  • Zoho MA and Custom Module

                                                                                                    I am trying to create a sync between Markting Automation and Zoho CRM. I am mapping a custom module from the CRM. The custom module has email field mobile phone field However I cannot finish the integration since the system keeps asking me for email or
                                                                                                  • Feature Request: Search in the PC client. Some thoughts about the search.

                                                                                                    Hi all. I'm really excited to start using Zoho Notebook, but I'm missing some of the search capabilities on my desktop. There are also some thoughts on improving search in general. Search is very important to me, without it it is difficult for me to use
                                                                                                  • When is partial reimbursement going to be launched?

                                                                                                    Hi there. I saw somewhere that the partial reimbursement feature is in the work. What is the update and ETA of that? Our clients and prospects have been asking us and we agree that that is an important feature to have.
                                                                                                  • All notes disappeared

                                                                                                    I've been using the notebook app for over five years on my phone without being logged into an account. A few days ago I opened the app and all my notes had disappeared. Since then I tried restarting my phone, updating the app and logging into my account,
                                                                                                  • Introducing Keyboard Shortcuts for Zoho CRM

                                                                                                    Dear Customers, We're happy to introduce keyboard shortcuts for Zoho CRM features! Until now, you might have been navigating to modules manually using the mouse, and at times, it could be tedious, especially when you had to search for specific modules
                                                                                                  • Is there any support for Drivers license and other forms of ID scanning capabilities?

                                                                                                    When scanning a drivers license barcode for data input to a Form, the scanning tool receives all the raw data but there doesnt seem to be a function to limit or remove the unnecessary fragmrnts, like a prefix. Is there any support or info in the help
                                                                                                  • Year-End Wrap: Declutter Your Inbox Using Email Filters

                                                                                                    Ping!—an email drops in. And another. And another! It's finally that time of the year when your inbox will be bursting with messages from team members, clients, and marketing agents, leaving you feeling overwhelmed and distracted. Sounds familiar? Now
                                                                                                  • Unified Notes View For Seamless Collaboration

                                                                                                    To facilitate better coordination among different departments and team members, the notes added to a record can now be accessed in all its associated records. With this, team members, from customer service representatives to field technicians, can easily
                                                                                                  • Q4 Europe In-person Zoho User Group Meetup: Streamlining Your Business Processes & Introduction to Zoho CRM for Everyone

                                                                                                    Hello Zoho Community, We are excited to announce our upcoming Zoho User Group meetup in Europe! This session is designed to help you streamline your business processes using Zoho CRM, with a special focus on enhancing customer interactions and leveraging
                                                                                                  • Formula fields - Request for dynamic recalculation / proper implementation

                                                                                                    Hi Guys, I have a big problem with Zoho formula fields. They don't recalculate each time the record is viewed - only when a record is edited. Formula fields should be updated dynamically each time a record is retrieved. As an example: I have a formula
                                                                                                  • Items attribute questions

                                                                                                    Many of my items have attributes, such as size and color. How can I add new fields to the "New Items" screen to capture that in my Purchase Orders, Items, and Sales Order pages? I only see these attribute fields when adding an Item Group. Also, on the
                                                                                                  • What do the Image Sizes mean in Zoho CRM Email Templates?

                                                                                                    Below you can see the image options in email templates: Banner, Fit, Small, Medium, Original, Custom. Can someone from Zoho please share with me: What each is/means? How each will look on desktop AND mobile? How to edit "custom"?  If I choose "Custom"
                                                                                                  • Workflows for Timesheet

                                                                                                    Good day, Any way to have timesheet as triggers? I looked into Zoho Flow and into Zoho Project automation but no where can I have timesheet as a trigger. Basically, I would like to trigger something upon timesheet approval. Right now, the only way to
                                                                                                  • Being able to draw inside a module ?

                                                                                                    I was wondering if anyone know of a solution for this request. We would like to be able to draw directly from one module in the CRM and have it attached to that record. Here is an example. Paul would go to the customer once he as done the measuring, he
                                                                                                  • 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
                                                                                                  • Record Asset Received as Payment

                                                                                                    How exactly would you account for this in books? For example, I receive a mini computer for a review and I get to keep it after the video is published. Would debit my normal asset account (e.g. Computers) and credit an income account (e.g. Other Income).
                                                                                                  • Delete a department or category

                                                                                                    How do I delete a Department?  Also, how do I delete a Category? This is pretty basic stuff here and it's impossible to find.
                                                                                                  • Transform Your Customer Support with AI-Powered Chatbots in Zoho SalesIQ

                                                                                                    Ever wondered how some companies seem to have superhuman customer support? Let's uncover their secret! In the digital age, customer expectations are skyrocketing. Did you know that according to McKinsey, 75% of consumers expect a response within five
                                                                                                  • Error 403: Forbidden When Updating Email Signature via API

                                                                                                    Hi Zoho Desk team, First, congratulations again on the excellent Zoho API. But, I’m encountering an issue while attempting to update an email signature via the API. Whenever I make a request to update the signature, the response returns an HTTP 403 Forbidden
                                                                                                  • Unused items should not count into the available number of custom fields

                                                                                                    Hey, I realized that unused Items reduce the number of available custom fields. I can't see a case where that makes sense. Especially in our case where we have two different layouts in Deals with a lot of different fields, this causes problems.
                                                                                                  • Translate any published presentation to the language of your choice

                                                                                                    As part of our constant effort to enrich your presentation experience, Zoho Show has rolled out a new feature for translating published presentations. Consider the following scenario: Zylker IT services, a multinational corporation, has announced product
                                                                                                  • Blueprint: multi-select lookup field not available in the criteria option

                                                                                                    I read this old forum post which stated that multi-select lookup fields are now selectable as an option in a Blueprint transition configuration: https://help.zoho.com/portal/en/community/topic/blueprint-multi-select-lookup-field-not-available-within-blueprint-transition
                                                                                                  • Power of Automation :: Automatically start / pause / stop timer on task status update.

                                                                                                    Hello Everyone, A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:-
                                                                                                  • Progressive Invoicing

                                                                                                    Progressing invoicing is needed for many industries. It would be great to see it implemented into Zoho Books as well. Set up and send progress invoices in QuickBooks Desktop (intuit.com)
                                                                                                  • Client Script - mapping data from different module

                                                                                                    Dear ZOHO Team Firstly I need to describe the need - I need to have data from Contacts module based on lookup field - the 5 map limit is not enough for me because I have almost 20 fields to copy So I have decided to make a Customer Script - and from unknown
                                                                                                  • Show iFrame of related List inside of Blueprint Transition

                                                                                                    Hey, is it possible to show an iFrame of a related list like this inside of a Blueprint transition?
                                                                                                  • DORA compliance

                                                                                                    For DORA (Digital Operational Resilience Act) compliance, I’ll want to check if Zoho provides specific features or policies aligned with DORA requirements, particularly for managing ICT risk, incident reporting, and ensuring operational resilience in
                                                                                                  • Files Uploaded to Zoho WorkDrive Not Being Indexed by Search Engines

                                                                                                    Hello, I have noticed that the files I upload to Zoho WorkDrive are not being indexed by search engines, including Google. I’d like to understand why this might be happening and what steps I can take to resolve it. Here are the details of my issue: File
                                                                                                  • Zoho Creator Upcoming Updates - December 2024

                                                                                                    Hi all, We're excited to be back with the latest updates and developments on the Creator platform. Here's what we're going over this month: Deluge AI assistance Rapid error messages in Deluge editor QR code & barcode generator Expandable RTF and multi
                                                                                                  • Customer Happiness not clickable when using API

                                                                                                    Is there a way to automatically add the Customer Feedback links when generating email drafts via the API? Currently, the feedback links are only added when generating an email draft using the UI. I tried using the endpoint described in https://desk.zoho.com/DeskAPIDocument#CustomerFeedback#CustomerFeedback_Getthecustomerfeedbackplaceholderlink
                                                                                                  • Calendar - Recurring Event - End of Month and Last Weekday of Month

                                                                                                    How do I set a calendar event to recur on the last day of every month? How do I set a calendar event to recur on the last weekday of the month?
                                                                                                  • Customer can't comment on SO or Invoice

                                                                                                    Hi I just saw that my customers are not able to submit a comment either on invoices or sales order. What happens if my customer hits submit is just nothing. only a red line appears on top of the page which probalby indicates an error. I'm not able to
                                                                                                  • Next Page