FAQs on Multi-Select Lookup (MxN) Field in Zoho CRM

FAQs on Multi-Select Lookup (MxN) Field in Zoho CRM

 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. 

Hey everybody!!!
Welcome back to another post in the Kaizen series!
In this post, we will address some of the most frequently asked questions about the Multi-Select Lookup(MxN) field from the Zoho CRM developer community forum.

1. What is a Multi-select lookup field?

A multi-select lookup field in Zoho CRM lets you create a many-to-many relationship between two modules. This means a record in one module can be linked to multiple records in another module and vice versa.
For example, using an multi-select lookup field, you can associate multiple skills with an employee.

2. How does the Mutli-Select Lookup relationship work?

When you create a Multi-Select Lookup between two modules, for example, Employees and Skills, Zoho CRM automatically creates a hidden linking module, which is also known as an MxN module. This module stores the associations between records in the two modules, enabling you to track and manage many-to-many relationships.

For instance, if you link Employees and Skills, a linking module named EmpXSkills will be created.

This linking module is accessible only via API.

Backend Flow of multi-select lookup Relationship



In the linking module, two lookup fields (lookup fields with api names - Employees and Skills) will be created. The lookup fields, one pointing to Employees and the other pointing to Skills from the linking module, establish a connection between the linking module and its associated module.

Why you cannot use a lookup field for this use case? 
In Zoho CRM, a lookup field creates a one-to-many relationship between two modules i.e. one record in the source module can be linked to only one record in the target module.

Example :
If you create a lookup field for Skills in the Employees module, each employee can be linked to only one skill. So, use a multi-select lookup field instead of a lookup field when you need to represent complex relationships like one employee - many skills and one skill - many employees.

3. How to create a multi-select Lookup field using Zoho CRM APIs?

To create a Multi-Select lookup field between two modules using Zoho CRM APIs, follow these steps:

Step 1: Identify the Module API Name
Before creating the field, you should know the API names of the Employees and Skills modules. For that, use the Get Module Metadata API.  

Request URL  : {{api-domain}}/crm/v8/settings/modules
Request method : GET



Now, search for the Employees module in the response and note its API name.

Step 2: Use the Create Custom Fields API

To establish a many-to-many relationship between two modules, in our case, Employees and Skills, you need to create a custom field of type multi-select lookup in the Employees module (parent module).  Here, we will associate multiple skills to an employee.

This custom field requires:
  • The related module you want to link to - Skills.
  • A display field from the related module
  • The linking module (EmpXSkills), which stores the actual associations.
Use the Create Custom Fields API to create custom fields.

Request URL : {{api_domain}}/crm/v8/settings/fields?module=Employees
Request method : POST

Sample input :



{
    "fields": [
        {
            "field_label": "Skills", //Name of the field in your module
            "data_type": "multiselectlookup", //Type of the field
            "multiselectlookup": { //This JSON object contains the multi-select lookup relationship details

                "connected_details": { //Details about the module and field you want to link
                    "module": {
                        "api_name": "Skills" //API name of the related module
                    },
                    "field": {
                        "field_label": "Skills" //The field in the related module to display
                    }
                },
                "linking_details": { //Details about the junction or linking module that manages the many-to-many relationship
                    "module": {
                        "plural_label": "EmpXSkills" //Plural label of the junction module
                    }
                }
            }
        }
    ]
}


4. How Do You Find the Linking Module and Field API Names?

To know the API name of the linking module:
Use the Get Modules API and search for "generated_type" : "linking" in the response to identify MxN modules. In our case, EmpXSkills.

Request URL : {{api_domain}}/crm/v8/settings/modules
Request method : GET



To know the field API names in the linking module:
Use the Get Fields Metadata API to retrieve the API names of lookup fields within the linking module.

Request URL : {{api_domain}}/crm/v8/settings/fields?module=EmpXSkills
Request method : GET

5. How do I associate records via a multi-select lookup field using the Insert Records API in Zoho CRM?

To associate records using a multi-select lookup field, you must provide the record IDs from the related module. The association is made through the linking module.

Example :
Associating multiple skills with an employee using the multi-select lookup field.

Request URL : {{api-domain}}/crm/v8/Employees
Request method : POST

Sample input :


{
  "data": [
    {
      "Name": "Patricia",
      "Email": "patricia@mail.com",
      "Position": "Marketing Specialist",
      "Year_of_Experience": 5,
      "Skills": [   // API name of the multi-select lookup field in the Employees module
        {
          "Skills": { // API name of the lookup field in the linking module pointing to the Skills module
            "name": "Marketing",
            "id": "5725767000002149427"  //ID from the Skills module are mandatory to establish the link
          }
        },
        {
          "Skills": {
            "name": "Social Media Marketing",
            "id": "5725767000002149476"
          }
        }
      ]
    }
  ]
}



6. How do I associate an Employee's skills using the linking module in Zoho CRM?

To establish a relationship between the Employees and Skills modules through the linking module, use the Insert Records API to create a record in the linking module, EmpXSkills.

To do this,
  • Use the appropriate lookup field API names to reference the parent module.
  • You must need the record IDs from both the Employees and Skills modules to create the associations.
Request URL : {{api-domain}}/crm/v8/EmpXSkills
Request method : POST

Sample input :


{
  "data": [
    {
      "Name": "Patricia",
      "Employees": {
        "id": "5725767000002161001"  // Record ID from the Employees module
      },
      "Skills": {
        "id": "5725767000002149476"  // Record ID from the Skills module
      }
    }
  ]
}



7. When should I use create/update operations in the Employees module vs the EmpXSkills module?

                Employees Module

               EmpXSkills (linking) Module

Use when you want to create or update an Employee and associate Skills using the Multi-select Lookup field.

Use when you want to create or remove associations between existing Employee and Skill records without modifying the actual Employee or Skill data.

Creating a new employee and assigning their skills at once.

Managing relationships between existing records i.e., linking and unlinking skills to employees.


8. How to update a record in the linking module?

To update a record in the linking module, use the Update Records API.
Request URL : {{api-domain}}/crm/v8/EmpXSkills/5725767000006269044
Request method : PUT

Sample input :


{
    "data": [
        {
            "Skills": {
                "name": "Marketing",
                "id": "5725767000002170035" //Associating another skill with the employee 
            }
        }
    ]
}

In the above sample, we have replaced an existing skill associated with an employee with another Skill in the linking module.This is done by updating the Skills lookup field in the EmpXSkills record.

Please note that in the linking module, Skills is a lookup field, so you can associate only one skill per linking record. But in the Employees module, Skills is a multi-select lookup field, so an employee can be associated with multiple skills.

9. How to unlink records from the parent module as well as the linking module?

Unlink the associated records from the parent module:

Using the Update records API, you can remove an associated skill from an employee, use the "_delete": null key within the multi-select lookup field in the Employee record update.

Request URL : {{api-domain}}/crm/v8/Employees/5725767000006269044
Request method : PUT

Sample input :

{
"data": [
        {
            "Skills": [
               {
                    "Skills": {
                        "name": "Marketing", 
                        "id": "5725767000002170035" // The Skill record you want to unlink
                    },
                    "id": "5725767000007228047", //record ID - The record created in the linking module for the employee with the Marketing skill
                    "_delete" : null 
                }
            ]
        }
    ]
}



Replace an associated record from the linking module:

Use the Update Records API to replace an existing association in the linking module.

Request URL : {{api-domain}}/crm/v8/EmpXSkills/5725767000007228035
Request method : PUT

Sample input :


{
    "data": [
        {
            "Skills": {
                "name": "Java",
                "id": "5725767000005259075" //replacing a new skill 
            }
        }
    ]
}

In the above sample, we have replaced the existing skill with Java.

10. Why am I seeing the error "DUPLICATE_LINKING_DATA"  in the Update Records API

This error occurs when you try to associate records with the parent record that are already linked with the Multi-select lookup field. To resolve this, check the records you are trying to link and make sure your association is only with records that are not already linked.

Know your existing linked records:

Before the Update Records API, use the Get Related Records Data API and search for the multi-select lookup field. In our case, Skills is the multi-select lookup field created in the Employees module. This will return all records already associated.

Example :


The response returns all Skills already linked with that Employee.

Using this way, compare the IDs from the API response with the new records you are about to link, and only proceed with non-duplicate IDs. This avoids duplicate entries and prevents the "DUPLICATE_LINKING_DATA" error.

11. What happens if I delete a record in the linking module?

When you delete a record in the linking module, it only removes the association between the related records in the Employees and Skills modules.

Note :
  • Deleting a linking module record removes only the relationship between two records from the Employees and Skills modules.
  • Deleting an Employee or Skill record deletes all corresponding entries in the linking module as well.

12. How do I query linked records?

Use the COQL API to query multi-select lookup data by specifying the corresponding linking module's API name directly in your query. The linking module is treated as a separate module in Zoho CRM, so you can retrieve associated records by querying it like any other module.

Sample query :


{
  "select_query": "select Skills.Name as skill, Employees.Name as employee from EmpXSkills where Skills.Name like '%Marketing%'"
}


Use the Get Module Metadata API to know the linking module's API name.

13. How do I export multi-select lookup records using the Bulk Read API?

To export multi-select lookup data, linking module records efficiently, use the Bulk Read API with the linking module’s API name.

Request method : POST

Sample Request :


{
    "callback": {
        "method": "post"
    },
    "query": {
        "module": {
            "api_name": "EmpXSkills" //API name of the linking module
        },
        "fields": [
            "Employees.Name",
            "Employees.Year_of_Experience",
            "Skills.Name"
        ],
        "criteria": {
            "group": [
                {
                    "field": {
                        "api_name": "Employees.Year_of_Experience" 
                    },
                    "comparator": "greater_than",
                    "value": "4"
                },
                {
                    "field": {
                        "api_name": "Skills.Name"
                    },
                    "comparator": "contains",
                    "value": "Social"
                }
            ],
            "group_operator": "AND"
        }
    }
}


14. Can I import my linking module's data using the Bulk Write API?

Yes. Like the Leads and Contacts modules, you can also import linking module's data into Zoho CRM using the Bulk Write API by directly specifying the linking module’s API name.

If you are importing data that involves both a parent module, Employees and its associated MxN linking module, follow these steps:

1. Create separate CSV files:
  • One for the parent module - Employees
  • One for the linking module - EmpXSkills
2. Zip the files into a single ZIP file.
3. Upload the ZIP in a single Bulk Write API request.
4. Ensure accurate field mappings are provided in the API request body.

Refer to Kaizen #131 - Bulk Write for parent-child records using Scala SDK for more details on handling parent-child records.


15. Can I receive notifications if a multi-select lookup field in a module is modified or updated?

Yes, you can receive notifications when a MxN field is updated using the Notification API. To enable instant notifications for actions performed in a module, use the respective API names of the linking module in the input body.

Request method : POST

Sample input :


{
    "watch": [
        {
            "channel_id": "10000",
            "events": [
                "EmpXSkills.all"  //EmpXSkills represents the API name of the linking module
            ],
            "return_affected_field_values": true  
        }
    ]
}


16. Can I use criteria-based filtering when accessing multi-select lookup data using the Search API?

Yes, you can filter multi-select lookup data using the criteria parameter in the Search API's URL.

Here is an example that fetches records from the EmpXSkills linking module.

Request URL : {{api-name}}/crm/v8/EmpXSkills/search?criteria=((Secondary_Email:equals:patricia@mail.com)and(Skills:equals:Content_Marketing))
Request method : GET

Sample response :



                                                                                                                               x-----------------------------x


We trust that this post meets your needs and is helpful. Let us know your thoughts in the comment section or reach out to us at support@zohocrm.com 

Stay tuned for more insights in our upcoming Kaizen posts!


Other FAQs in the Kaizen series :


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

    • 【Zoho CRM】CRM for Everyoneに関するアップデート:関連データ機能

      ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 今回は「Zoho CRM アップデート情報」の中から、CRM for Everyoneの新機能「関連データ機能」をご紹介します。 関連データ機能は、あるタブのデータを別のタブに柔軟に関連付け、異なるタブで管理されている情報を1か所にまとめて表示できます。 たとえば、組織タブとチームタブのデータを関連付けることで、必要な情報に効率よくアクセスでき、顧客理解を深めながら他チームとの連携もスムーズに行えます。 目次 1. 関連データの設定方法
    • Inventory to Xero Invocie Sync Issues

      Has anyone had an issue with Invoices not syncing to Xero. It seems to be an issue when there is VAT on a shipping cost, but I cannot be 100% as the error is vague: "Unable to export Invoice 'INV-000053' as the account mapped with some items does not
    • How to activate RFQ? What if a price list has ladder price for items?

      Where can I find the option to activate request for quotation? How does it work? If the item has ladder price, does it gets calculated depending on how many items are in the cart?
    • Cannot access KB within Help Center

      Im working with my boss to customize our knowledge base, but for some reason I can see the KB tab, and see the KB categories, but I cannot access the articles within the KB. We have been troubleshooting for weeks, and we have all permissions set up, customers
    • Can't join canal Developers Zoho User

      Hello, I received an invitation to join this channel, but I get an error when I try to join it, and I get the same error when I go to the Zoho Cliq interface > Search for a channel. Is this because I don't have a license linked to this email address?
    • Desk Email reply - set default font / use custom font

      Hello, in our e-mails, which we send to our customers, a certain font must be used (Corporate Design): Segoe UI https://en.wikipedia.org/wiki/Segoe#Segoe_UI How can this be included? How can this be set as the default font to ensure that this font is
    • Notes created in mobile can no longer be accessed in desktop

      Working with a 2013 Mac running OS 10.14.6; Desktop Notebook version 4.5.3. Using Motorola Moto G Power 5G - 2024; Android app version 6.7 I have been using Notebook for some years. Starting several weeks ago, the notes newly created ion the phone can
    • PDF Templates - Checkbox Borders

      Is there a way to remove the border of a radio/checkbox on a PDF? I'd like to use the function of checkbox but if there's no easy way to remove the border (the PDF form already has a rectangle so it gets cluttered), then I'm forced to create a single
    • Zoho CRM's custom views are now deployable from sandboxes

      This feature is now available for users in the AU, JP, and CN DCs. New update: This feature is now available for users in CA and SA DCs. Hello everyone, We're excited to announce that you can now deploy custom views from sandboxes to your production environment
    • Generate a link for Zoho Sign we can copy and use in a separate email

      Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
    • Settings Icon No Longer in ZOHO Desk?

      In ZOHO desk, there has been a gear icon for settings. as of yesterday, it is no longer there. I showed up briefly this morning but is gone again. Anybody else experiecing this?
    • Introducing the all-new email parser!

      Greetings, We are pleased to introduce to you, a brand-new, upgraded version of the Zoho CRM Email Parser, which is packed with fresh features and has been completely redesigned to meet latest customers needs and their business requirements. On that note,
    • Tip #43 - Track, Review, and Analyze Your Assist Sessions with Reports-'Insider Insights'

      Did you know you can generate detailed reports for both remote support sessions and unattended access sessions in Zoho Assist? This makes it easy to monitor technician activity, measure efficiency, and review customer interactions. Let us now take a closer
    • Can we generate APK and IOS app?

      Dears, I want to know the availability to develop the app on zoho and after that .. generate the APK or IOS app  and after that I added them to play store or IOS store.. Is it possible to do this .. I want not to use zoho app or let my customers use it. thanks 
    • Simplified Call Logging

      Our organization would like to start logging calls in our CRM; however, with 13 fields that can't be removed, our team is finding it extremely cumbersome. For our use case, we only need to record that a call happened theirfor would only need the following
    • Sub form doesn't as formula field

      Is it possible to get formula field in sub form in futures?
    • Week date range in pivot table

      Hello, I need to create a report that breakouts the data by week.  I am using the pivot table report, and breaking out the date by week, however the date is displayed as 'Week 1 2014' format.  Is there anyway to get the actual dates in there? ex. 1/6/2014-1/12/2014 Thanks,
    • How do I get Status History data of my Projects?

      I want to build a table in Zoho Analytics that Groups by Date, when Projects entered a certain status. I cannot find Status History or any such useful data available in the Setup of my Data Source sync. Please advise how I can achieve this?
    • Is it possible to hide fields in a Subform?

      Since layout rules cannot be used with Subforms, is there another way, or is it even possible, to hide fields in a subform based on a picklist fields within said subform? For example, if the Service Provided is Internet, then I do not want to see the
    • Single Task Report

      I'd like a report or a way to print to PDF the task detail page. I'd like at least the Task Information section but I'd also like to see the Activity Stream, Status Timeline and Comments. I'd like to export the record and save it as a PDF. I'd like the
    • Weekly Tips :Instantly find what you need with Attachment Viewer

      Your inbox must be packed with project emails, shared notes, and scattered attachments. You are looking for one specific file—a presentation slide or maybe a media clip from a team update—but don’t want to dig through endless email threads or switch between
    • Putting Watermark on Zoho Sheet

      Can this be done?
    • Missing Zoho Desk integration option for form workflows

      According to the help page "Configure Zoho Desk integration in form workflows" we should be able to select Zoho Desk as an integration target but when I open the integrations list then Zoho Desk is not being listed in it. We are on the Premium plan which should already support Zoho Desk integrations.
    • 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
    • Gantt for 2 or more projects

      Hello, I'm trying the free version of your produtc. It is veryyy good!!!! I don't know if in the Standard plan, I can overview a Gantt Graph for 2 or more Projects Milestone. This would be very helpfull for managing teams and taking decisions about who I will assign a task to. In the paid plan Do I have this possibility? Thank you.
    • Integrating a Zoho Project Gantt Chart into Reports

      Is is possible to integrate a Zoho Project Gantt Chart into a Zoho Report Dashboard. I am in the process of creating Project Status Dashboards for the projects that we track in Zoho Projects and I would like to incorporate the gantt chart within Reports.  Please let me know! Thanks
    • ZOHO BOOKS - EXCESSIVELY SLOW TODAY

      Dear Zoho Books This is not the first time but it seems to be 3 times per week now that the system is extremely slow. I work on Zoho Books 95% of my day so this is very frustrating. Zoho you need to do something about this. I have had my IT guy check
    • Gantt Chart - Zoho Analytics

      Are there any plans to add Gantt Charts capabilities to Zoho Analytics?
    • Displaying related quotes in sales order and back

      Hi, My colleague liked to see to which sales orders, the quote has been converted. Quote shows Invoices, but not SO. Same, they would like to see the quotes in the sales order, as they can see invoices, packages, shipment, How can we achieve this ? Thank
    • Tip of the Week #71–Auto-move incoming messages to the right inboxes with keywords

      We all know that customer-facing teams, especially your sales and support teams, can’t afford to miss even a single customer conversation. But sometimes, sales queries or support requests can easily get lost in a crowded inbox or even end up in the wrong
    • Clearing Fields using MACROS?

      How would I go about clearing a follow-up field date from my deals? Currently I cannot set the new value as an empty box.
    • Migrating a Zoho Forms form into Zoho Creator

      Hi, How can I migrate my Zoho Forms form into Zoho Creator? Thanks. Truly, Emad
    • Is there any way to recall an email sent using Zoho CRM?

      If an email is sent using Zoho Mail, there is a recall option/functionality that is available to the sender. Is there any way to recall an email if it was sent using Zoho CRM? I can't seem to find that option. Any help would be appreciated.
    • Quick Create needs Client Script support

      As per the title. We need client scripts to apply at a Quick Create level. We enforce logic on the form to ensure data quality, automate field values, etc. However, all this is lost when a user attempts a "Quick Create". It is disappointing because, from
    • is it possible to add more than one Whatsapp Phone Number to be integrated to Zoho CRM?

      so I have successfully added one Whatsapp number like this from this User Interface it seems I can't add a new Whatsapp Number. I need to add a new Whatsapp Number so I can control the lead assignment if a chat sent to Whatsapp Phone Number 1 then assign
    • Problem with reports due to "Connected" items change - Yes this IS a problem

      Now that the change has been made to use "connected" items I can no longer run the reporting I need in CRM. I should be able to start with Deals as the parent, connect down to the Account (Account_Name) on the deal as the child, then to any child items
    • Zoho sheet desktop version

      Hi Zoho team Where can I access desktop version of zoho sheets? It is important as web version is slow and requires one to be online all the time to do even basic work. If it is available, please guide me to the same.
    • Introducing notifications in the vendor portal

      Imagine this: You're a recruiter working with multiple vendors on a high-volume hiring project. You’ve just updated a job description after a last-minute change from the hiring manager. One of your vendors, however, is still working off the older version
    • CRM limit reached: only 2 subforms can be created

      we recently stumbled upon a limit of 2 subforms per module. while we found a workaround on this occasion, only 2 subforms can be quite limiting in an enterprise setting. @Ishwarya SG I've read about imminent increase of other components (e.
    • LESS_THAN_MIN_OCCURANCE - code 2945

      Hi I'm trying to post a customer record to creator API and getting this error message. So cryptic. Can someone please help? Thanks Varun
    • Next Page