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

    • Darshan Hiranandani : Feature Request: Allow Uploading Edited Meeting Recordings for Attendees

      Hello everyone, I'm Darshan Hiranandani, wanted to propose a feature that could be useful for meeting organizers. Would it be possible to allow meeting organizers to upload an edited version of the meeting recording? Here’s the use case: many of us tend
    • Zoho mail filter Add to WorkDrive doesnt't work

      Hello, We have a problem with using the filter in the email. So, we want that when a bulk payment confirmation from the online store arrives, this email is automatically saved in HTML format on the drive using the action 'Add to Zoho WorkDrive -> Email
    • Deleted message in SPAM

      In one of my gmail accounts (getnickifit@gmail.com) I had an email from PayPal in the SPAM folder. I thought I was moving the message to the inbox from the zoho mobile but it looks like it was deleted. It is no where to be found--inbox, trash, etc. Can it be restored?
    • i keep see there is a connetion issue connecting 3rd party api on zoho when using zia

      hi there , i have set up open ai api to zoho zia (copied and pasted to zoho zia) but I keep getting notificaiton "there is a connetion issue connecting 3rd party api on zoho" when using zia on top when click zia and try to type in word there
    • Emails take up to 14 hours to arrive and often never arrive at all.

      I've been on hold on your support phone for two hours. I spent an hour waiting to talk to somebody somebody finally picked up. They asked me to give them my ID number and when I found it, they were gone they didn't hang up. They just walked away from
    • Real Estate CRM

      How can I tailor my CRM for real estate? I had seen an image where the CRM included property tabs.
    • Emails take up to 14 hours to arrive and often never arrive at all.

      I've been on hold on your support phone for two hours. I spent an hour waiting to talk to somebody somebody finally picked up. They asked me to give them my ID number and when I found it, they were gone they didn't hang up. They just walked away from
    • Zoho Desk Validation Rule Using Custom Function

      Hi all, I tried to find the way to validate fields using custom function just like in Zoho CRM but to no avail. Is there a way to do this?
    • Custom function daily limit and procedural programming

      Dearest Zoho Today, support confirmed that if I call a custom function from another custom function then I will use up two, with regards to my daily limit. A few times, we have blown our daily limit and that means that ordinary business processes don't run for the rest of the day. I have to mop these up the following day and there is no guarantee that I will get it right. Therefore, I can't afford to waste any. Procedural programming has been around for over 50 years now and it greatly simplifies
    • BIN Locations

      Hi, I’m new to Zoho inventory and unless Im missing something, I cannot find BIN locations anywhere in ‘items’? please tell me it’s there somewhere?!? Thanks
    • Bigin & Booking. Associate the appointment with existing customers in bigin.

      I tried to change the stage of the pipeline associated to a existing contact after he book a appointment in Booking. I use flow to create a event in booking when a appointment is done. But.... How can I relate the appointment with the existing contact
    • Zoho Finance Limitations 2.0 #12: Can't sync Books System Fields (Item Category or Preferred Vendor) to CRM Products. Double entry required

      We add products to Books and sync them to CRM whenever updates are done. However I still have to do double entry because the Books "Item Category" and "Preferred Vendor" fields are not available as options to sync. Scenario Workflow I add a new product
    • Storage Space Issue

      I made a few Header templates in the CRM email that adds some fields ( 2 fields to be exact ) to the subject line, however I ran out of "storage Space" when I need to add it to 3 more members of my team. How do I solve this ? If I need to upgrade , which
    • Colour Coded Flags in Tasks Module List View

      I really like the colour coded flags indicating the status of the tasks assigned to a Contact/Deal in the module list view. It would be a great addition to have this feature available in the list view of activities/tasks. I understand you have the Due
    • Implement Meeting Polls in Zoho Bookings

      Dear Zoho Bookings Support Team, We'd like to propose a feature enhancement related to appointment scheduling within Zoho Bookings. Current Functionality: Zoho Bookings excels at streamlining individual appointment scheduling. Users can set availability
    • Two way sync between Bookings and Zoho Mail Calendar

      Is there a way to enable a two-way sync between Bookings and the Zoho Mail Calendar? As far as I know, it is only possible to check conflicts from Bookings and push meetings from Bookings to the Calendar. However, when I press the sync button, appointments
    • How to link Custom Fields in Ticket view

      Hi team, I have created 2 custom fields in our Accounts Module would like them to show in our ticket information. We don't have Enterprise so I cannot do it via a workflow, but I know you can do lookup fields to link modules. How would I go about making
    • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

      Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
    • A consultant with different working hours for each workspace

      As of now, it doesn't seem to be possible to set different working hours for a single consultant in two (or more) different workspaces. For example: A  consultant is going to work 2 weeks/month at workspace A and 2 weeks/month at workspace B. Yet, right
    • Rollup summary for custom module

      Rollup summary feature was introduced almost a year ago: https://help.zoho.com/portal/en/community/topic/introducing-rollup-summary-in-zoho-crm-public-early-access-2023 It does not support custom modules tough and this post aims to track such feature
    • Is it possible to set a value to a field based on certain conditions

      Greetings Say i have a field that i want to set its value based on the value of another field.. for example if "number" field has value greater than 10, i want to set my field's value to X. Or if radio group had option 1 selected, then i want to set my
    • What is the Desk API?

      I'm trying to fetch a lookup field data from desk to our creator application and it doesn't work. I'm guessing that my search parameter is wrong? On my trial function fetch if I use these: tickets = invokeurl [ url :"https://desk.zoho.com/api/v1/tickets/351081000145244764"
    • How to Parse XML Data Returned by API?

      I have several APIs integrated with my CRM and they work great. I am having some trouble though parsing data out of a large string/array in Funtions? I need to be able to pull the DeviceId and the WebSiteDeviceName from each PanelDevice. I would appreciate
    • Can the meeting location be specified by the customer?

      I own a painting company. I offer free estimates to customers, and I'd like them to be able to enter the meeting address in the booking form... so, the place they want me to give a painting estimate for. I need the customer to be able to tell me where
    • Zoho Bookings - Reserve with Google

      Does Zoho Bookings plan to to integrate with Reserve with Google?
    • Single use booking

      Hello everyone! It would be very interesting to be able to generate unique booking links. Once a booking is made through that link, it will no longer work. Calendly has something similar: https://help.calendly.com/hc/en-us/articles/1500001292022-How
    • Features Req: Service-Specific Calendar And Limit number of bookings per guest

      By The Grace of G-d. Hi, I Came across 2 features i believe more users would love to see added to the amazing bookings app: 1. Service-Specific Calendar I dont want to open my whole calendar to all of my services. For Example, Lets say i have a free consultation
    • Generating Discount Coupons for Zoho Bookings

      Hi, Is there provision to generate Discount Coupons for appointment bookings? I could not see that in the settings and this is very much needed. Please suggest us. Thanks
    • 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
    • Featured Blog Image Size

      What is the ideal size for the cover/featured image of a Zoho Sites blog? Because all our cover images are getting these black stripes horizontally or on the sides (look images)
    • This mobile number has been marked spam. Please contact support.

      Hi Support, Can you tell me why number was marked as spam. I have having difficult to add my number as you keep requesting i must use it. My number is +63....163 Or is Zoho company excluding Philippines from their services?
    • Zoho CRM v2.1 deprecation or sunset plans ?

      Hi Team Wanted to know if there is any plan to deprecate v2.1 CRM apis https://www.zoho.com/crm/developer/docs/api/v2.1/ and if yes by when
    • Do I need to migrate to API v7?

      Current workload forces me to ask this question. Even though I know API v7 has better features, I have many previous API calls written in v2 that still function well. Is there any compelling reason (that I may be missing) for me to make time to migrate
    • Has anyone implemented OCR functionality as a text input method for the CRM?

      The users in my organisation are used to writing meeting notes using the pen and paper notebook. Asking them to enter those notes into the CRM is a chore and I suspect is a major hurdle for the digitalisation initiative to take off in this organisation.
    • way to change the interface language (e.g. to English) in the whole Zoho One ecosystem at once

      Hi everyone. I had a need to create a new Zoho One account for a new company. However, since I did it from Germany, I have defaulted to German language in Zoho One interface (in all apps). Can you please tell me if there is a way to change the interface
    • My email id is blocked. My storage is exceeded 5GB. Deleted unwanted emails.

      My email id is prem@justbootup.com. I tried to unblock ,but it says only for the paid user. Can you help to unblock?.
    • How Can I delete accounts or change type of account?

      My accountant has wrongly categorized many accounts as Other Assets instead of Accounts receivable while putting in opening balances. How can I delete an account or recategorize it?
    • How to have sub heads in Salary account

      Hi How can i have sub heads under salary account, we tried but it is not allowing us to create sub heads Thanks Alka
    • Can I give access of my Zoho Spreadsheet?

      Hello Everbody! I work with a travel and tourism company, and my job is to record the data of clients of the company. And I use zoho for my work. So my question is can I give access of my sheet to the clients and my company. Kindly guide me. Thankyo
    • Is it possible to display formulas in cells instead of calculated results?

      I want to export my Zoho sheet as tab separated text without losing the formulas. In excel, I would use the settings Options - Advanced - show formulas in cells instead of their calculated results then save as tab separated values. How do I do this in
    • Next Page