Layout Rules in Zoho Vertical Studio | Vertical Studio Help Guide

Layout Rules

Layout rules let you change what users see on a record page based on the value they select in an earlier field. For example, if a user selects Vehicle Sales in a Deal Type field, you can show fields related to delivery and pricing. If the user selects Service Contract instead, you can show service-specific sections and make a different set of fields mandatory. This helps you keep the layout focused, reduce unnecessary input, and guide users through the right path for each record.
Layout rules support three actions: Show Fields, Show Sections, and Set Mandatory Fields.
Layout rules are packagable components. When you publish your application, layout rules are included in that version and are available to subscriber orgs during signup or application upgrade. 


For instance, imagine an Automotive Platform application where the Deals module tracks Vehicle Sales and Service Contracts. A sales team wants Delivery Notes to appear only when the deal reaches a later stage, while the service team wants extra sections to appear only for specific service conditions.
You create a layout rule that shows Delivery Notes and marks it mandatory when Stage is Ready for Delivery. After publishing, subscriber orgs get the same rule behavior, so users only see the extra field when it is relevant to the record they are editing.

How to access and configure layout rules

  1. Sign in to your Developer Console.
  2. Open your application and click Edit.
  3. Go to Build > Modules.
  4. Select the module where you want to manage layout rules.
  5. Open the Layout Rules tab.
  6. Click New Layout Rule.
  7. Enter the rule name and description.
  8. Select the primary field that controls the rule.
  9. Configure the condition and click Next.

  10. On clicking the Trigger action button, it lists the following three possible actions:
    1. Show Fields - You can choose specific fields to be shown when the criteria is met.
    2. Show Sections - You can choose specific sections with multiple fields to appear only when the criteria is met.
    3. Set Mandatory Fields - You can set the desired fields to be mandatory only if the criteria is met.
  11. Once you have selected the action, the Create Action tab opens on your right side.
  12. 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.
  13. 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.
  14. Click Save. 


Info
Note: The primary field cannot be a multi-select picklist field.

Points to Remember

  1. Layout rules are applied on create, edit, and view pages. 
  2. The Show Subform action will be available only if a subform is present in the layout.
  3. Layout rules are also effective in the approval process of records. 
  4. Layout rules are supported in Kanban view only when the primary field is a mandatory picklist. 
Fields Mandated by Layout Rules
  1. Layout rules created with the Set Mandatory Fields action will be captured via pop-window in the following scenarios.
    1. Editing the value of the primary field to meet the layout rule criteria. 
    2. Updating the Deal Stage (primary field) from the Detail page, Blueprint, or the Pipeline view. 
    3. Updating the Task Status (primary field) from the Activities Related List,  Kanban View, Home page or custom view.
Layout Rules Limitations
  1. 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. 
  2. Layout rules only with Set Mandatory Field action will be triggered through APIs and Mass update. 
  3. The primary field of the layout rule cannot be a Multi-select picklist field.
  4. Maximum rules allowed - 10 per layout
  5. Maximum parent conditions allowed - 25
  6. Maximum branch conditions allowed - 5 per parent condition
  7. Maximum branch conditions criteria allowed - 5 per branch condition
  8. 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 

A Packaged Layout Rule is a layout rule created in the developer console and included when you publish your application. Subscriber orgs receive packaged layout rules during signup or when they upgrade to a version containing layout rule changes.
Subscribers can use the packaged behavior on records, but they cannot modify the packaged rule definition itself. Rule changes made in the developer console are deployed with the next published version, based on the property-level packaging behavior.

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 Subform already deployed in the subscriber's organization.

Property
Upgrade Type
Subscriber Modify Access
Name
Upgradable
No
Description
Upgradable
No
Primary field
Upgradable
No
Condition
  1. Name
  2. Criteria Pattern
Upgradable
No
Trigger an action
  1. Show Fields
  2. Show Sections
  3. Set Mandatory Fields
Upgradable
No
Target fields or sections
Upgradable
No
Mandatory field settings
Upgradable
No
Rule status (active or inactive)
Non-upgradable
Yes

Publish and version upgrade

Scenario 1: New subscriber signs up on the latest version

Behavior: A new subscriber org receives all packaged layout rules that exist in the latest published version.
Example: Your latest version includes a rule for Vehicle Sales that shows Delivery Notes when Stage is Ready for Delivery. A new subscriber signing up on that version receives the rule immediately.

Scenario 2: You rename a rule and update its condition criteria

Behavior: Upgradable layout rule changes are applied during upgrade for existing subscriber orgs.
Example: You rename a rule and update its description. Existing subscriber orgs receive those changes after upgrade.

Scenario 3: You update rule logic while a subscriber has locally deactivated the rule

Behavior: Upgradable changes are applied during upgrade, and local subscriber settings for deactivated rules remain intact.
Example: You update a rule condition and a subscriber org has already deactivated that rule. After upgrade, the updated rule definition is available, but the subscriber-side deactivation remains in place.

Scenario 4: You delete a packaged layout rule

Behavior: Deleted layout rules are removed from existing subscriber orgs during upgrade. Records that already matched the rule are not rewritten by the delete action alone.
Example: You delete a rule that made Delivery Notes mandatory for Ready for Delivery. After upgrade, the rule is removed from the subscriber org, and the form no longer applies that rule logic.

Scenario 5: You deactivate a packaged layout rule

Behavior: Status update is non-upgradable. This change will not be reflected in the subscriber orgs.
Example: A subscriber org deactivates a rule that shows Delivery Notes. You later publish another version with unrelated changes. After upgrade, the rule remains inactive.

Scenario 6: You reactivate a packaged layout rule

Behavior: A reactivated rule continues to work after later application upgrades.
Example: A subscriber org deactivates a rule, then turns it back on before the next upgrade. After upgrade, the rule remains active and continues to control the configured fields or sections.

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. 

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.

Warning
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.

Troubleshooting upgrade behavior

Use these checks when layout-rule changes do not appear as expected after publish or upgrade.

Upgrade is blocked by layout rule limits

If upgrade fails due to layout-rule constraints, check rule counts and criteria depth before publishing.
  1. Open the target layout in the developer console.
  2. Verify that the layout has no more than 10 rules.
  3. Confirm each rule stays within condition and action limits.
  4. Save, publish, and upgrade again.

Rule update is not visible after publish

If a rule appears to revert after publish, verify whether another rule with overlapping criteria is still active.
  1. Compare rule names and criteria for duplicates.
  2. Remove or merge overlapping rules.
  3. Publish the corrected version.
  4. Upgrade an existing subscriber org and validate create, edit, and view behavior.

Upgrade fails due to duplicate rule behavior

If upgrade reports a conflict around layout rules, audit both developer and subscriber rule sets for equivalent logic.
  1. Identify rules that target the same field set with similar conditions.
  2. Keep one canonical rule and retire redundant rules.
  3. Publish the cleanup as a separate version.
  4. Upgrade subscribers and confirm there is no conflict.

Fields cannot be edited because of rule conditions

If users cannot edit specific fields, verify whether a mandatory or show action is being triggered unexpectedly.
  1. Open the relevant layout rule and inspect condition criteria.
  2. Test the rule with sample records that should and should not trigger the action.
  3. Narrow the condition or update target fields if the rule is too broad.
  4. Publish and upgrade, then validate field editability in the subscriber org.

Limits 

Layout rules have the following limits that you should plan for before publishing at scale.
  1. Maximum rules per layout: 10
  2. Maximum parent conditions: 25
  3. Maximum branch conditions per parent condition: 5
  4. Maximum branch condition criteria per branch condition: 5
  5. Maximum actions per branch condition: 25