Update Multi-Select Lookup Fields via API in Zoho CRM - Establish many-to-many relationships using linking modules or REST API
Overview:
A Multi-Select Lookup Field in Zoho CRM allows you to establish a many-to-many relationship between two modules. This is useful when a record in one module can be linked to multiple records in another, and vice versa.
Business Example:
Let’s say your business deals with training services. You have a Trainers module and a Courses module. Each trainer can handle multiple courses, and each course can be conducted by multiple trainers. In such a case, a multi-select lookup field between Trainers and Courses allows you to easily manage and view these relationships from either module.
To learn more about Multi-Select Lookup Fields, refer to this document.
Understanding Multi-Select Lookup Field Functionality:
When a multi-select lookup field is added to a module, a corresponding multi-select lookup field is automatically created in the referenced (looked-up) module, enabling a bidirectional relationship.
Example:
If you add a multi-select lookup field for the Courses module in the Trainers module:
A field named Trainers will automatically be created in the Courses module.
If you associate Courses X, Y, and Z with Trainer A, then:
Trainer A will show Courses X, Y, Z in its multi-select field.
Course X will also display Trainer A in its corresponding multi-select lookup field.
Screenshots

Linking module:
While creating a multi-select lookup field, you also have the option to enable a Linking Module. The Linking Module stores the relationships between records as individual entries, helping preserve and reference the connections explicitly.
Continuing with the above example:
Linking record | Relationship |
| |
Record 2 | Course Y ↔ Trainer A |
Record 3 | Course Z ↔ Trainer A |
Screenshots
Why update Multi-Select Lookup Fields via API?
While users can manually associate records via the CRM UI, programatically updating multi-select lookup fields using API offers significant advantages:
Bulk Association: Easily associate multiple records in one go, especially useful for migrations or mass updates.
Automation: Trigger updates as part of workflows, integrations, or external business logic.
Efficiency: Saves time and reduces human error when handling large volumes of data.
This is particularly beneficial for partners building custom solutions, handling third-party data imports, or working with complex data relationships across modules.
How to Update a Multi-Select Lookup Field via API?
There are two approaches to update multi-select lookup fields programmatically using the Zoho CRM API.
✅ Approach 1: Using the Linking Module
By creating a record in the linking module, the relationship between records is established and reflected in both modules' multi-select lookup fields.
Sample Deluge Script:
- mp = Map();
- mp.put("Trainers", trainerId);
- mp.put("Courses", courseId);
- createRecord = zoho.crm.createRecord("Trainers_and_Courses", mp);
- info createRecord;
Note:
➤ Trainers_and_Courses - API name of the linking module.
➤ Courses_Multi_Select_Lookup - API name of the multi select look-up field present in the Trainers module.
➤ Trainers_Multi_Select_Lookup = API name of the multi select look-up field created in the Courses module.
✅ Approach 2: Directly Updating Using REST API (Without Linking Module)
You can also use the CRM REST API (v2.1) to directly update the multi-select lookup field.
Sample script:
- // Initialise a list to store multiple course record maps
- recordMapsList = list();
- // Create a map for the first course with its ID and name
- firstCourse = Map();
- firstCourse.put("id",5117245000058535290);
- firstCourse.put("name","Course Y");
- // Wrap the first course inside another map using the lookup field API name
- courseOneMap = Map();
- courseOneMap.put("Courses_Multi_Select_Lookup",firstCourse);
- // Add the first course map to the list
- recordMapsList.add(courseOneMap);
- // Create a map for the second course with its ID and name
- secondCourse = Map();
- secondCourse.put("id",5117245000058535300);
- secondCourse.put("name","Course Z");
- // Wrap the second course inside another map using the same lookup field API name
- courseTwoMap = Map();
- courseTwoMap.put("Courses_Multi_Select_Lookup",secondCourse);
// Add the second course map to the list - recordMapsList.add(courseTwoMap);
- // Create the final map for the multi-select lookup field
- multiSelectLookupFieldMap = Map();
- multiSelectLookupFieldMap.put("Courses_Multi_Select_Lookup",recordMapsList);
- // Add the field map to a list under the "data" key (required format for CRM API)
- data = list();
- data.add(multiSelectLookupFieldMap);
- // Create the final payload to send in the PUT request
- payload = Map();
- payload.put("data",data);
- // Make the API call to update the Trainer record with the associated courses
- updateRecord = invokeurl
- [
- url :"https://www.zohoapis.com/crm/v7/Trainers/5117245000059509243"
- type :PUT
- parameters:payload.toString()
- connection:"zohocrm"
- ];
- info updateRecord;
Note:
➤ Trainers - API name of the module where the multi-select lookup field for Courses exists.
➤ Courses_Multi_Select_Lookup - API name of the multi-select lookup field in the Trainers module.
Conclusion:
Using either the Linking Module approach or the direct REST API update, you can effectively manage and automate multi-select lookup relationships in Zoho CRM. Choose the method that best fits your integration scenario.
Custom Solution Created by Yogeshwari N | Zoho Partner Support