Related List in Zoho Vertical Studio | Vertical Studio Help Guide

Related List

Related Lists are customizable components that allow you to associate a record with other records in your vertical application. They provide contextually relevant data from other modules or third-party integrations, displayed directly within a record's detail page. This provides a holistic view of a record by consolidating all relevant information in one place, which improves user experience and decision-making. 

In addition to the pre-defined Related Lists available in a module, you can create custom Related Lists in two ways:
  1. Using a custom Deluge Function
  2. Embedding a widget into the Related List as an iframe.
You can create a Related List using a custom Deluge Function to map a module and display specific data. To create a Related List using function,
  1. Log into your application and navigate to Build > Components
  2. Shift to the Related Lists tab and click Add Related List.
  3. In the Deluge code editor, define the following in the top bar:
    1. Related List Name: The name of your Related List.
    2. Module: The module to which you want to map the Related List.
  4. Write your custom Deluge function logic to fetch and display the desired data.
  5. Click Save and Close.
Check the Functions help page for additional guidance and packaging behavior. 

Example

Below is a sample Deluge function code to create a Related List named Similar Customers in the Vehicles module. This Related List displays customers who own the same vehicle model as the parent record.

vehicleId = vehicle.get("Vehicles.ID");
vehicleRecord = zoho.crm.getRecordById("Vehicles",vehicleId.toLong());
vehicleName = vehicleRecord.get("Name");
crmResp = zoho.crm.searchRecords("Vehicles","(Name:equals:" + vehicleName + ")",1,10);
//info crmResp ;
responseXML = "";
rowVal = 0;
if(crmResp.size() > 1)
{
responseXML = responseXML + "<record>";
for each  vehicle in crmResp
{
data = vehicle.get("Vehicle_Contact_1");
contactId = data.get("id");
contactRecord = zoho.crm.getRecordById("Contacts",contactId);
contactPhone = contactRecord.get("Phone");
contactName = contactRecord.get("Last_Name");
responseXML = responseXML + "<row cnt='" + rowVal + "'><FL val='Customer Name'>" + contactName + "</FL><FL val='Customer Phone'>" + contactPhone + "</FL></row>";
rowVal = rowVal + 1;
}
responseXML = responseXML + "</record>";
}
else
{
responseXML = responseXML + "<error>=><message>No other customer has a vehicle with the same model.</message></error>";
}
return responseXML;
A Widget-Related List allows you to embed custom widgets within the Related List as an iFrame. These widgets can embed external applications or display dynamic content directly within the application. 

Refer to the Widgets help page for more details. 
Packaged Related Lists are created in the developer console and deployed to subscriber organizations during signup or through upgrades. Any new Related list that is created in the developer console will be included in the next version of the application.

To know more about packaging, please refer to our guide on Components Packaging in Zoho Vertical Studio.

The following table explains the upgrade behavior of an existing packaged Related List already deployed in the subscriber's organization.

Property
Upgrade Type
Modify Access
Related List Name
Upgradable
Developer Only
Module
Non-Upgradable
Non-Editable
Function Code
Upgradable
Developer Only
Connected App
  1. Sanbox URL
  2. Height
Upgradable
Developer Only

Changes and Impacts 

When a packaged Related List is modified, published, and pushed as an upgrade to the subscribers' accounts, the impacts to the existing records in the subscriber organization are explained below.
Changing the Related List name does not affect the associated records. The related records will still appear, but under the updated name.
Modifying the function code or widget code can impact the related records displayed, depending on the extent of the changes made.
Deleting a Related List can result in the loss of visibility to relevant data for the parent record. Once deleted, the associated data will no longer be accessible through the Related List.

Warning
Caution! 

Deleting a Related List is a destructive change. It can have lasting effects on your subscriber data and configurations. Please consider the consequences carefully before proceeding, and only move forward if absolutely necessary.