Skip to main content

Custom Modules

Custom Modules in Zoho Products allow developers to extend the application data model by defining new entities tailored to specific business needs. From an SDK perspective, custom modules behave like first-class modules and can be accessed, manipulated, and extended using widgets.

Note:
Custom module widget locations and event names are dynamic and differ from standard modules.The placeholder name custommodule_api_name used in locations and events must be replaced with your actual custom module API name.
For example, if your custom module API name is cm_bookings:
Widget locations:
  • cm_bookings.list.sidebar
  • cm_bookings.details.sidebar
Event names:
  • ON_cm_bookings_PRE_SAVE
  • ON_cm_bookings_PREVIEW
Note:

Always replace the custommodule_api_name name in widget locations and event identifiers with your own custom module’s API name.

Methods

Get Custommodule Details

Retrieves data related to the current context. This method allows your widget to fetch record details, field values, or metadata required for rendering or processing logic.

Commonly used for :
  • Fetch record information
  • Read field values
  • Access contextual module data
Supported Locations :
`custommodule_api_name`.creation.sidebar`custommodule_api_name`.details.sidebar`custommodule_api_name`.details.button
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('${{custommodule_api_name}}').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
module_record_idcustommodule_api_name.module_record_id
created_timecustommodule_api_name.created_time
last_modified_timecustommodule_api_name.last_modified_time
record_namecustommodule_api_name.record_name
record_name_formattedcustommodule_api_name.record_name_formatted

Set Custommodule Details

Updates or sets data within the current context. This method allows your widget to modify field values, update state, or pass data back to the host application.

Commonly used for :
  • Update field values
  • Set widget or module state
  • Pass data to the parent application
Supported Locations :
`custommodule_api_name`.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('${{custommodule_api_name}}.name', <value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
module_record_idcustommodule_api_name.module_record_id
created_timecustommodule_api_name.created_time
last_modified_timecustommodule_api_name.last_modified_time
record_namecustommodule_api_name.record_name
record_name_formattedcustommodule_api_name.record_name_formatted

Set Custommodule customfields

Specifically designed to update custom field values within the current context. This method allows your widget to target and modify custom fields without affecting standard fields, ensuring precise data management.

Commonly used for :
  • Update custom field values
  • Manage user-defined data points
  • Ensure targeted updates to specific fields
Supported Locations :
`custommodule_api_name`.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('${{custommodule_api_name}}.<custom_field_api_name>',<value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}