Welcome to Portal
Are you making the most of your subforms in Zoho CRM? Do you wish you could automate subform interactions and enhance user experience effortlessly? What if you had Client APIs and events specifically designed for subforms?
We are thrilled to introduce one of the most anticipated Client Script Updates: Subform Events and Subform-specific Client APIs in Client Script!
Subform events are triggered from user actions, such as adding or deleting rows or updating data in subform. These events allow you to run Client scripts for validation, automation, or dynamic updates. By leveraging Subform Events, you gain precise control over subform behavior.
This empowers you to achieve advanced interactivity, streamline workflows, enhance user interactions, and deliver exceptional user experiences.
Subform Events
onCellChange
onRowAdd
onRowDelete
beforeRowDelete
beforeRowUpdate (Applicable only for Detail Pages)
Supported Pages
Standard - Create/Edit/Clone Pages, Detail page
Canvas - Create/Edit/Clone Pages, Detail page
Wizard - Create/Edit Pages
Available Client APIs
Scenario 1 : Apply row value based dynamic filters and display error and clear a cell in subform for invalid input
Organization: Zylker, a manufacturing company using Zoho CRM.
Subform Filtering: In the Quotes module, products in the subform are filtered based on the selected Product Category.
Stock Validation: When the quantity in the Quoted Items subform exceeds available Stock, an error message is displayed. The field is reset to null.
Click here to view the source code.
Scenario 2 : Secure subform rows with beforeRowDelete
Organization: Zylker ensures data integrity during key Deal stages in Zoho CRM.
Restricted Stages: Subform item deletion is restricted in the following stages:
Proposal/Price Quote
Negotiation/Review
Closed Won
Closed Lost
Enforcement: The beforeRowDelete event verifies the Deal stage and returns false to prevent deletion.
Click here to view the source code.
Scenario 3 : Auto-Fill values for new rows and clear subform based on custom conditionI
Module: Campaign module in Zoho CRM.
Auto-Population: When a new row is added to the subform:
The onRowAdd event uses setValue() to auto-populate:
"Status" field with "Planning".
"Allocated Budget" with $3000.
Region Change: When the "Region" field changes:
The onChange event triggers clear() to reset campaign details for region-specific data.
Click here to view the source code.
Scenario 4 : Tailor cell, row and column locks in subforms and manage field visibility with ease.
Module: Campaign subform in Zoho CRM.
Allocated Budget Field:
Editable only by admins.
Read-only for all other users.
Row Locking:
The setReadOnly() method, triggered by onLoad and onCellChange:
Locks the entire row when the Status is "Complete."
Restricts the Allocated Budget field unless the Status is "Planning."
Field Visibility:
The Type of Campaign column is managed with setVisibility():
Visible only when Parent Type is "others."
Click here to view the source code.
Scenario 5 : Dynamic data check on subform cell update
Validation: Ensure the Allocated Budget of all campaigns does not exceed the Total Budget Allocated.
Restriction:
If the budget exceeds the limit:
Prevent the row from being saved.
Display an error message.
Click here to view source the code.
Limitations :
1. The onRowAdd event is not supported during bulk row addition.
2. Subform methods and events do not work in line-item subforms present in Blueprint transition.
3. Row added in subforms using Guided selling do not trigger the onRowAdd event
for now.
4. This update is not supported on mobile devices.
We hope you find this update useful!
Subscribe to receive notifications from this topic.