Kaizen #190 - Queries in Custom Related Lists

Kaizen #190 - Queries in Custom Related Lists


Hello everyone!

Welcome back to another week of Kaizen! 

This week, we will discuss yet another interesting enhancement to Queries.

As you all know, Queries allow you to dynamically retrieve data from CRM as well as third-party services directly within our CRM platform. 

Remember how we discussed the use case of displaying the nearby post offices based on the shipping code? We used query variables and associated this query with the Decision component of Kiosk in Kaizen #166.

In Kaizen #169, we used serialization to fine-tune the same query to display only those post offices that delivered to a particular shipping code.

Falling in love with contextual data? This post will make sure you do!

Custom Related Lists are now powered by Queries!

Custom related lists have long been a powerful way to present relevant and contextual information right alongside the CRM records.

They allow you to display additional, context-specific information whether it’s from another module, a third-party service, or a custom integration. 

We’re now taking that power to the next level. You can now create related lists that are powered by Queries, meaning they can dynamically fetch data from other modules, external services, or custom integrations, at runtime!

Let's see this in action, as always!

Use case: Show deliverable post offices based on Shipping Code in a Related List

Imagine you’ve built a custom module called Orders to track all product shipments. Now, you'd like to display a list of nearby post offices that can deliver to the order’s Shipping Code, and you want this list to update automatically for each record.

You can create a query that pulls in post office data from an external API, with the Shipping Code passed as a variable at runtime. 

Since we're using an external source, you must add this source to Trusted Domain and Sources. This enables the query to make the external API call and fetch the required details.

Trusted Domain


Add Source


The Query


Serializer and Query's Response


You can see that the query fetches all the post offices in that PIN code and the serializer displays only those with the delivery status 'Delivery'. 

Let us use this query in a related list to display contextual data alongside the record itself.

Create a custom Related List

  1. Open a record in your Orders module and click the three-dot menu at the top right.


  2. Select Add Related List.
  3. In the dialog, choose Queries and pick your query from the list.

  4. Give your related list a name.
  5. For variable mapping, use merge fields to assign value to the variable dynamically. In our example, we are assigning the Shipping Code value to the query variable(Mailing_Zip).

  6. Click Done and Save.
  7. Your new related list will appear on the left panel, and you can reorder it as needed. The list will now update automatically based on the Shipping Code for each order, pulling fresh data every time you view a record.


Each time you view an order, the related list will fetch real-time post office data using the shipping code for that specific record; no manual updates are needed.



Using Queries in Related Lists opens up endless possibilities. With the power of Queries in related lists, you can: 
  • Avoid static data as related lists become truly dynamic.
  • Display contextual data - data that is relevant to the record.
  • Negate the need for lookup fields as queries can fetch data from external services and CRM modules seamlessly.


We hope you liked this post. Let us know what you think in the comments or write to us at support@zohocrm.com.

If you have any interesting use cases of your own, please do share them with us and the community.

Cheers!


    Access your files securely from anywhere







                          Zoho Developer Community






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


                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


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

                                                                                                          • Update Portal User Name using Deluge?

                                                                                                            Hey everyone. I have a basic intake form that gathers some general information. Our team then has a consultation with the person. If the person wants to move forward, the team pushes a CRM button that adds the user to a creator portal. That process is
                                                                                                          • Create new Account with contact

                                                                                                            Hi I can create a new Account and, as part of that process, add a primary contact (First name, last name) and Email. But THIS contact does NOT appear in Contacts. How can I make sure the Contact added when creating an Account is also listed as a Contact?
                                                                                                          • Flow Task Limits - How to Monitor, Understand Consumption?

                                                                                                            So, I got an email last night saying that I've exhausted 70% of my tasks for this month, and encouraging me to buy more tasks. I started to dig into this, and I cannot for the life of me figure out where to find any useful information for understanding,
                                                                                                          • Unable to retrieve Contact_Name field contents using Web API in javascript function

                                                                                                            Hello, I've added a field in the Purchase Order form to select and associate a Sales Order (Orden_de_venta, lookup field). I've also created a client script to complete some fields from the Sales Order (and the Quote), when the user specifies the related
                                                                                                          • Updating Woocommerce Variation Products Prices Via Zoho CRM

                                                                                                            I can update product prices with this flow: But I can't update variant products. I got a code from Zoho for this, but I couldn't get it to work. It needs to find the product in the CRM from the SKU field and update the variation with the price there.
                                                                                                          • Attention API Users: Upcoming Support for Renaming System Fields

                                                                                                            Hello all! We are excited to announce an upcoming enhancement in Zoho CRM: support for renaming system-defined fields! Current Behavior Currently, system-defined fields returned by the GET - Fields Metadata API have display_label and field_label properties
                                                                                                          • Placing a condition before converting the LEAD

                                                                                                            Hi,  I need some assistance with Lead conversion. I need to place certain conditions before allowing the user to convert the lead.  For example: up until the certain status's doesn't equal "green" don't allow to convert lead.  I tried creating this using
                                                                                                          • How to access email templates using Desk API?

                                                                                                            Trying to send an email to the customer associated to the ticket for an after hours notification and can't find the API endpoint to grab the email template. Found an example stating it should be: "https://desk.zoho.com/api/v1/emailtemplates/" + templateID;
                                                                                                          • Zoho Campaigns - Why do contacts have owners?

                                                                                                            When searching for contacts in Zoho Campaigns I am sometimes caught out when I don't select the filter option "Inactive users". So it appears that I have some contacts missing, until I realise that I need to select that option. Campaigns Support have
                                                                                                          • Zoho CRM Calendar | Custom Buttons

                                                                                                            I'm working with my sales team to make our scheduling process easier for our team. We primary rely on Zoho CRM calendar to organize our events for our sales team. I was wondering if there is a way to add custom button in the Calendar view on events/meeting
                                                                                                          • Power of Automation:: Automate the process of updating project status based on a specific task status.

                                                                                                            Hello Everyone, Today, I am pleased to showcase the capabilities of a custom function that is available in our Gallery. To explore the custom functions within the Gallery, please follow the steps below. Click Setup in the top right corner > Developer
                                                                                                          • Emails Disappearing From Inbox

                                                                                                            I am experiencing the unnerving problem of having some of the messages in my inbox just disappear.  It seems to happen to messages that have been in there for longer than a certain amount of time (not sure how long exactly). They are usually messages that I have flagged and know I need to act on, but have not gotten around to doing so yet.  I leave them in my inbox so I will see them and be reminded that I still need to do something about them, but at least twice now I have opened my inbox and found
                                                                                                          • BUTTONS SHOWN AS AN ICON ON A REPORT

                                                                                                            Hi Is there any way to create an action button but show it as an icon on a report please? As per the attached example? So if the user clicks the icon, it triggers an action?
                                                                                                          • Power of Automation :: Automatic removal of project users once the project status is changed.

                                                                                                            A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate complex tasks and
                                                                                                          • Customizing Form Questions per Recipient Group in Zoho Campaigns/Forms

                                                                                                            Hello everyone, I would like to ask if it’s possible in Zoho Campaigns or Zoho Forms to send out a campaign where the form questions can be customized based on the group of recipients. Use case example: I have prepared 20 questionnaire questions. For
                                                                                                          • Zoho Books - France

                                                                                                            L’équipe de Zoho France reçoit régulièrement des questions sur la conformité de ses applications de finances (Zoho Books/ Zoho Invoice) pour le marché français. Voici quelques points pour clarifier la question : Zoho Books est un logiciel de comptabilité
                                                                                                          • in zoho creator Sales Returns form has sub form Line Items return quantity when i upate the or enter any values in the sub form that want to reflect in the Sales Order form item deail sub form field Q

                                                                                                            in zoho creator Sales Returns form has sub form Line Items return quantity when i upate the or enter any values in the sub form that want to reflect in the Sales Order form item deail sub form field Quantity Returned\ pls check the recording fetch_salesorder
                                                                                                          • Client Script Payload Size Bug

                                                                                                            var createParams = { "data": [{ "Name": "PS for PR 4050082000024714556", "Price_Request": { "id": "4050082000024714556" }, "Account": { "id": "4050082000021345001" }, "Deal": { "id": "4050082000023972001" }, "Owner": { "id": "4050082000007223004" }, "Approval_Status":
                                                                                                          • Bulk Moving Images into Folders in the Library

                                                                                                            I can't seem to select multiple images to move into a folder in order to clean up my image library and organize it. Instead, I have to move each individual image into the folder and sometimes it takes MULTIPLE tries to get it to go in there. Am I missing
                                                                                                          • Edit Permission during and after approval?

                                                                                                            When a record is sent for approval Can a user request for edit permission from the approver? We don't want to give edit permissions for all the records under approval Only on a case-by-case basis How can we achieve this?
                                                                                                          • Forms - Notification When Response Submitted

                                                                                                            How do I set it up to generate an email notification when a response (class request) is submitted?
                                                                                                          • how to use validation rules in subform

                                                                                                            Is it possible to use validation rules for subforms? I tried the following code: entityMap = crmAPIRequest.toMap().get("record"); sum = 0; direct_billing = entityMap.get("direct_billing_details"); response = Map(); for each i in direct_billing { if(i.get("type")
                                                                                                          • Notes Issues

                                                                                                            Been having issues with Notes in the CRM. Yesterday it wasn't showing the notes, but it got resolved after a few minutes., Now I have been having a hard time saving notes the whole day. Notes can't be saved by the save button. it's grayed out or not grayed
                                                                                                          • How to disable user entry on Answer Bot in Zobot

                                                                                                            Hi, I have an Answer Bot in my Zobot, here is the configuration: I only want the user to choose 1 of the 4 the options I have provided: When no answer found, user chooses 'I'll rephrase the question' or 'Ask a different question When answer is found,
                                                                                                          • More admin control over user profiles

                                                                                                            It's important for our company, and I'm sure many others, to keep our users inline with our branding and professional appearance. It would be useful for administrators to have more control over profile aspects such as: Profile image User names Email signatures
                                                                                                          • Please Make Zoho CRM Cadences Flexible: Allow Inserting and Reordering Follow-Up Steps

                                                                                                            Sales processes are not static. We test, learn, and adapt as customers respond differently than expected. Right now, Zoho Cadences do not support inserting a new step between existing follow-ups or changing the type of an existing primary step. If I realize
                                                                                                          • Changing the Default Search Criteria for Finding Duplicates

                                                                                                            Hey everyone, is it possible to adjust the default search criteria for finding and merging duplicate records? Right now, CRM uses some (in my opinion nonsensical) fields as search criteria for duplicate records which do nothing except dilute the results.
                                                                                                          • Clear Tag & Linking Between Quotes and Sales Orders

                                                                                                            Hi Zoho Team, In Zoho Books, when a quote is converted into a sales order, it would be extremely useful to have: A clear tag/indicator on the quote showing that it has been converted into a sales order. A direct link in the sales order back to the originating
                                                                                                          • How to Track and Manage Schedule Changes in Zoho Projects

                                                                                                            Keeping projects on track requires meticulous planning. However, unforeseen circumstances can cause changes to schedules, leading to delays. It becomes important to capture the reason for such changes to avoid them in the future. Zoho Projects acknowledges
                                                                                                          • Zoho Books Sandbox environment

                                                                                                            Hello. Is there a free sandbox environment for the developers using Zoho Books API? I am working on the Zoho Books add-on and currently not ready to buy a premium service - maybe later when my add-on will start to bring money. Right now I just need a
                                                                                                          • Add Direct Ticket Link to Zoho Help Center Portal in Email Replies

                                                                                                            Hi Zoho Support Team, We hope you're doing well. We’d like to request a small but valuable improvement to enhance the usability of the Zoho Help Center portal (https://help.zoho.com/portal/en/myarea). Currently, when someone from Zoho replies to a support
                                                                                                          • [Webinar] Deluge Learning Series - AI-Powered Automation using Zoho Deluge and Gemini

                                                                                                            We’re excited to invite you to an exclusive 1-hour webinar where we’ll demonstrate how to bring the power of Google’s Gemini AI into your Zoho ecosystem using Deluge scripting. Whether you're looking to automate data extraction from PDFs or dynamically
                                                                                                          • Connecting Zoho Inventory to ShipStation

                                                                                                            we are looking for someone to help connect via API shipStation with Zoho inventory. Any ideas? Thanks. Uri
                                                                                                          • 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
                                                                                                          • New in Cadences: Option to Resume or Restart follow-ups when re-enrolling records into a Cadence, and specify custom un-enrollment criteria

                                                                                                            Managing follow-ups effectively involves understanding the appropriate timing for reaching out, as well as knowing when to take a break and resume later, or deciding if it's necessary to start the follow-up process anew. With two significant enhancements
                                                                                                          • Im Stuck in an EDIT ONLY WITH WIZARD issue

                                                                                                            So I found Wizards to be a really helpful tool in minimizing the exposure of redundant, superfluous fields to staff that would never otherwise have to edit those fields. My issue is, that when the record (in this case a lead) is created with a wizard,
                                                                                                          • Account upgrade

                                                                                                            Good evening, I upgraded my account and paid for it. From standard to professional. Unfortunately after the paiment my account was not upgraded. Please your advise. Best Regards Erik van Staverden
                                                                                                          • How to set ALL default dates of my organization to DD-MM-YYYY format?

                                                                                                            All replies to this question comes from a time where the UI was different. It's extremely frustrating not being able to find how to do this simple setting change. I want everything and everyone in my organizations to have DD-MM-YYYY date format by default.
                                                                                                          • How can I sync from Zoho Projects into an existing Zoho Sprints project?

                                                                                                            Hi I have managed to integrate Zoho Projects with Zoho Sprints and I can see that the integration works as a project was created in Zoho Sprints. But, what I would like to do is to sync into an existing Zoho Sprints project. Is there a way to make that
                                                                                                          • Meet Canvas' Grid component: Your easiest way to build responsive record templates

                                                                                                            Visual design can be exciting—until you're knee-deep in the details. Whether it's aligning text boxes to prevent overlaps, fixing negative space, or simply making sure the right data stands out, just ironing out inconsistencies takes a lot of moving parts.
                                                                                                          • Next Page