Layout rules offer a powerful way to dynamically change the behavior of fields, sections and subforms in real-time based on the values provided by the user. This helps in streamlining the data entry and enhance user experience by ensuring only relevant fields are displayed based on the user's input.
For example, in a sales layout, a custom field called Deal Size can be made mandatory only if the Lead Source is 'Referral'. This aids in capturing crucial information for higher-quality leads.
Creating a Layout Rule
- Log in to Zoho Developer Console and click Vertical Solutions.
- In the following page, click on the Edit icon of the solution to which the layout has to be created.
- In the left menu, navigate to Modules.
- Select the desired module from the Modules tab. Now, in the Layout Rules tab, click on New Layout Rule.
- Fill in the details like the name and description of the layout rule.
- Now, under the Choose a primary field that controls this rule, pick the desired field.
- Configure the condition using operators and click Next. Click on the edit icon in the flowchart to add one or more conditions to the primary field.
- On clicking the Trigger action button, it lists the following three possible actions:
- Show Fields - You can choose specific fields to be shown when the criteria is met.
- Show Sections - You can choose specific sections with multiple fields to appear only when the criteria is met.
- Set Mandatory Fields - You can set the desired fields to be mandatory only if the criteria is met.
- Once you have selected the action, the Create Action tab opens on your right side.
- Click on the empty field, and it will list you the available field/section in the layout for you to create an action when the condition is satisfied.
You can also select more than one field/section for a single layout rule.
Consider a field called Annual Revenue has to appear when the Lead Source (primary field) is 'Trade Show' and the Industry (secondary field) is 'Data/Telecom OEM'. In this situation, use the edit icon to configure the Secondary field. If you want to configure an action for a different secondary field value, use the plus icon.
Select the Choose an Option when you want to configure a whole new action for the primary field (Lead Source)value which is different from the value used in the earlier condition. - Click Save.
Points to Remember
- Layout rules are applied on create, edit, and view pages.
- The Show Subform action will be available only if a subform is present in the layout.
- Layout rules are also effective in the approval process of records.
- Layout rules are supported in Kanban view only when the primary field is a mandatory picklist.
Fields Mandated by Layout Rules
- Layout rules created with the Set Mandatory Fields action will be captured via pop-window in the following scenarios.
- Editing the value of the primary field to meet the layout rule criteria.
- Updating the Deal Stage (primary field) from the Detail page, Blueprint, or the Pipeline view.
- Updating the Task Status (primary field) from the Activities Related List, Kanban View, Home page or custom view.
- Layout rules are effective only when creating the records manually. If the primary field value is updated via import, webforms, workflows, APIs, lead conversions, and Mass update will not trigger the layout rule.
- Layout rules only with Set Mandatory Field action will be triggered through APIs and Mass update.
- The primary field of the layout rule cannot be a Multi-select picklist field.
- Maximum rules allowed - 10 per layout
- Maximum parent conditions allowed - 25
- Maximum branch conditions allowed - 5 per parent condition
- Maximum branch conditions criteria allowed - 5 per branch condition
- Maximum actions allowed - 25 per branch condition
(The total number is inclusive of all actions. There are no individual limits per action)
Packaged Layout Rules
Packaged Layout Rules are the ones that are created in the Developer console and deployed in the subscriber organizations during Signup or via upgrade. Following content will explain the behavior of such Layout Rules.
To know more about packaging, refer to our guide on
Components Packaging in Zoho Vertical Solutions Platform.
Property | Upgrade Type | Modify Access |
Name | Upgradable | Developer Only |
Description | Upgradable | Developer Only |
Primary field | Upgradable | Developer Only |
Condition - Name
- Criteria Pattern
| Upgradable | Developer Only |
Trigger an action
- Show Fields
- Show Sections
- Set Mandatory Fields
| Upgradable | Developer Only |
Rename | Upgradable | Developer Only |
Delete | Upgradable | Developer Only |
Deactivate Layout Rule | Upgradable | Developer Only |
Changes and Impacts
When a Layout Rule is modified, published, and pushed as an upgrade to the subscribers' accounts, the impacts to the existing records or configurations in the Subscriber's org, such as leads, contacts, and module data that are associated to the particular layout rule, are provided here.
1. Adding a new Layout rule to an existing primary field
When you create a new layout rule for a layout that already contains records, the rule will apply to all new records. For existing records, the layout rule will take effect when any update is made to those records.
2. Editing a layout rule
When you edit an existing layout rule, changes to the following properties will not impact any existing records:
- Name
- Description
- Rename
However, changes made to the 'Primary Field' and 'Condition' properties will take effect on the records whenever they are updated, provided the primary field's value meets the newly defined criteria.
3. Deleting / Deactivating a Layout Rule
If a layout rule is deleted or deactivated, existing records remain unchanged. However, for new records, the fields and sections that are configured to appear only when the criteria is met will appear without any constraints.
Caution!
Deleting a Layout Rule 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.