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.
    • 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
    • Recent Topics

    • Possible for "Specify URL Criteria" in URL/Permalink settings to be assigned to a variable?

      I want to embed a Zoho Analytics chart view as a Related List item in the Zoho CRM Accounts module, such that when one is viewing a CRM Accounts module record for an Account, the user will see the chart for that specific company. Is it possible to set
    • How to present an Analytic on a CRM dashboard and filter it on loginuser id

      How to present an Analytic on a CRM dashboard and filter it on loginuser id? I want to display an Analytics pivot table (as a widget) on a CRM dashboard and have the pivot filtered on the loginuser. I want additional user-filters available, such as date,
    • Allow 2 logos for Branding, one for Light Mode and one for Dark Mode?

      Our logo has a lot of black text on it. If we leave the background transparent, per recommendation of Zoho, when a user is viewing a file and turns on dark mode, our logo is not really visible and looks really weird. It would be really great if we could
    • Pre-fill TO and CC fields for Email Templates

      This would be a game changer to be able to set either specific email addresses or merge fields based on deal role titles into email templates. Please pass this along to *hopefully* add to future features of Zoho CRM.
    • Payroll In Canada

      Hi, When can we expect to have payroll in Canada with books 
    • Why can't we associate a contact to mulitple accounts?

      This simple feature has been for 14 years now... it's way past ridiculous. We don't want to add a multiple lookup field, we just want to add a second account to our contact. This way i'll go on Jonh Doe and see in the account field : Company 1 and Company
    • Easy way to delete attachments

      I've reached my data limit and would like to run a view/report, and mass delete attachments. Is there an easy, fast way to do this? Moderation Update: Post Summary: There are two features the post discusses a) Easy way to remove Email attachments Will
    • Calendar Bookings in Recruit

      Hi there, We have recently started using Zoho recruit and although it has some great functionality there are a few gaps that are causing real headaches. One of those being how interviews are scheduled. The majority of our hiring managers are field based
    • Multiple Vendor SKUs

      One of the big concerns we have with ZOHO Inventory is lack of Vendor Skus like many other inventory software packages offer. Being able to have multiple vendor skus for the same product would be HUGE! It would populate the appropriate vendor Sku for
    • How to Use Branch-Specific Templates for Invoices Created via Zoho Books invoice API?

      I am using the Zoho Books Invoice API and I am sending the branch_id when creating an invoice. The invoice is being generated, but it is using the default template rather than the template that corresponds to the branch I specified. In Zoho Books, when
    • Automatic Department and Employee Sync Between Zoho One and Zoho People

      Dear Zoho Support, I'm writing to propose a valuable feature request that would streamline data management and improve user experience within the Zoho ecosystem: automatic synchronization between departments and employees in Zoho One and Zoho People.
    • Delete Unactive Users form Directory

      Hi, how to delete all unactive users ?
    • Manual Journal entry problem

      Hi, all my manual Journal entries are not reflected in my general ledger. i have check to see if the entry were done correctly and everything is fine. Please help me
    • Changing Related Modules in a Report

      Once a report is created, is it possible to add Related Modules? David Shalev | Chief Revenue Officer | 800 558 9130 davids@splitit.com | www.Splitit.com
    • Is there a way to limit/turn off unlimited Version History?

      We save CAD files in our Zoho WorkDrive and while the files aren't very big themselves, whenever someone hits the save button in the CAD program it uploads another version of the file to the WorkDrive. This means files that are only a few MBs in size can actually be taking up 10s of GB in our WorkDrive if someone is saving frequently. Is there a way to limit the number of versions WorkDrive stores to save WorkDrive space?
    • ZOHO One Webinar Functionality

      I am currently trialling ZOHO Projects and have also been looking into over a dozen different Webinar solutions from various vendors. I understand that ZOHO Webinars is a stand alone tool. But that ZOHO Meetings also offers webinar functionality. The
    • Avoid None option in List Custom Fields

      Does anybody know a way to avoid -- None --  option to be displayed in a List Custom Field?  - With Mandatory option selected, you can prevent from saving if user select --None-- value. - With Default value selected, a different value than --None-- is
    • How do I modify the the incoming/current call popup? I can modify other call pages but not that one.

      I want to modify the incoming and active call popup on the crm to include customer relevant information, such as purchase history or length of relationship. Under modules and fields, I don't seem to see active call as a choice to modify, only the main
    • JavaScript or iframe embed with transparent background

      If I have a form with transparent Wallpaper, it appear great on my website by using my default background. However, using Zoho Forms SAVE button, the user is directed to Zoho Forms managed page and a blank background. Alternatively, I can include a Wallpaper
    • Emails and Kanban for Portals

      There was talk portals would have emails and email templates, and kanban view. Is there any release date for this? Portals has been so good for offering a simple crm option. It just needs a couple of small things.
    • Custom sorting Axis in a Heatmap report

      I have a heatmap and want to sort the order of the axis in a custom priority order - is this possible ? So I want the priority to be "New, Urgent, High, Medium, Low, Not Set, Unknown" Can I set this manually ?
    • ZOHO BackStage

      How to get list of events, using ZOHO BackStage APIs. Is it possible OR not?
    • Which attribute in Zoho books invoice api represent branch attached to the invoice?

      Hi Zoho Team, We have done the integration with Zoho Books API. While fetching data from Invoice API we want to get branch value attached to the invoice. We could not figure out which field in "Get an Invoice" api represents branch value attribute. Thanks
    • The 3.1 biggest problems with Kiosk right now

      I can see a lot of promise in Kiosk, but it currently has limited functionality that makes it a bit of an ugly duckling. It's great at some things, but woeful at others, meaning people must rely on multiple tools within CRM for their business processes.
    • Zoho People down

      Zoho People (EU) appears to be inaccessible this morning. Have gotten through log-in and MFA but have been on the "Please wait while we work our charm..." page for several minutes now. A colleague has tried to access it via the One dashboard and experienced
    • Zoho Analytics Pivot Table - How to compare month vs last year same month

      Hi, I had created a pivot table with setup as below: Column: - Delivery Date Row: - Customer Group Data as column - Total amount (sum > normal) (show data of the month) - Total amount (sum > % difference from previous value) (compare between this month
    • Adding Bluesky channel

      Hello, Is Bluesky (AT protocol) soon added on Social ? Bluesky is being developped and is now open to anyone (no more invitation) Thank you
    • No Zoho Support on the weekends or after hours?

      Zoho Support is only available Monday - Friday during normal business hours. My business (as does many businesses) operates 7-days a week. Last Saturday, I had a client come in and in order for me to help her, I needed to log into CRM but to my surprise,
    • How do I overcome the 800 transaction rule limit?

      I just received a message: "You have reached the maximum rule limit of 800." I searched the documentation, and I didn't find anything about the cap or limit. I asked the ZOHO Books team if there is a way to increase the limit. Their answer was: "Please
    • Search functionality in Vault is very poor

      Hi Zoho Team Please... the search functionality is absolutely vital in Vault, particularly when it's being used by a team. It's just a fact of life that everybody has their own way of naming something, so using exact match on the Password name is horribly
    • 👋 Pessoal, como está sendo sua experiência com ferramentas de produtividade?

      Percebo que muitos usuários de soluções como Google Workspace e Microsoft 365 acabam enfrentando desafios quando pensam em migrar de plataforma, especialmente por conta de multas contratuais ou até pela complexidade em adaptar as equipes. Além disso,
    • Quais são os maiores desafios que você enfrenta ao implementar o Zoho CRM?

      Olá, pessoal da comunidade Zoho Brasil! Sou parceiro autorizado da Zoho e, ao longo do tempo, tenho notado que cada implementação de CRM traz desafios únicos, dependendo do segmento de negócio, das metas da empresa e até da familiaridade da equipe com
    • Parent - Child Ticket Twins

      I think i maybe losing my mind. Are these two completely separate parent-child ticketing functions? I think I remember adding a plugin years ago and I think I also remember seeing something about parent-child ticketing in a release notes being added.
    • Can the Comments from approval process be posted onto a module field and not on the timeline?

      I have set up approval process for the quotations module and would like for the approval comments to be posted onto a module field as opposed to me searching for the particular quote and going to the timeline section. This would also help keep tabs on
    • auto reply shopify order details in zoho desk based on order number in subject using deluge script custom function

      auto reply shopify order details in zoho desk based on order number in subject using deluge script custom function
    • Is there an ability to keep the status field unlocked while having an active blueprint?

      Hi. Is there an ability to keep the status field unlocked while having an active blueprint? Here is the case. We have a transition let's say "Ask to the customer" When we do this transition the Status is switch to "waiting for customer" But if for exemple
    • Rename Category and Sub Category fields

      Is it possible to rename the field labels for Category and Sub Category - if so can this be done at layout or department level ?
    • Thoughts on users being able to create Zoho accounts?

      For anyone who's used Zoho for a while, I'm sure you've come up against an issue where you create an account for a user, and they go ahead and sign up for a new one accidentally. Then, only they can delete the account, as it exists outside the organisation.
    • Deluge should permit a connection to be set with a variable

      Hello, Being one who occasionally likes to post code in the forums, I try to make anything that the end user needs to define be present at the very top of the script so that those who want to implement the script won't have to hunt through lines of code,
    • Bcc option in "new ticket --> send as email" disappeared

      Is it just me or did the bcc option disappear in the "send as email" option of new tickets in desk? This is very inconvenient.
    • Next Page