TechBuzzPro

Zoho CRM: Highlight Mandatory Fields with Red Lines

· 5 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can display mandatory fields with a red accent line in Zoho CRM. This visual cue helps users quickly identify which fields are required before saving a record, reducing errors and ensuring data completeness. This is achieved through custom field validation rules and Zoho CRM’s layout editor. The process involves creating a validation rule that triggers a red border when a mandatory field is left blank and then adjusting the layout to display this visual indicator.

What You'll Need

  • An active Zoho CRM account with administrator privileges.
  • Knowledge of Zoho CRM's layout editor and validation rules.
  • Familiarity with the modules you want to apply this to (e.g., Leads, Contacts, Deals).

Step-by-Step

  1. Access the Layout Editor: Navigate to the module you want to customize (e.g., Leads). Go to Setup > Customization > Modules and Tabs. Find your module in the list and click Layout.
  2. Identify the Mandatory Field: Locate the field you want to make visually prominent. Note its name and API name (important for validation rule creation). Field labels can differ slightly by version, device or region.
  3. Create a Validation Rule: Go to Setup > Automation > Validation Rules. Click Create Rule.
  4. Configure the Validation Rule:
    • Module: Select the module you're working with (e.g., Leads).
    • Name: Give your validation rule a descriptive name (e.g., "Mandatory Field - Company Name").
    • Description: Add a brief description of the rule's purpose.
    • Run on: Select "Create" and "Edit." This ensures the rule runs both when creating new records and editing existing ones.
    • Condition: This is the core of the rule. Use the following logic:
      • Field: Select the mandatory field (e.g., "Company Name").
      • Operator: Choose "is empty."
      This condition checks if the field is blank.
    • Error Message: Enter a clear error message that will be displayed to the user if the condition is met (e.g., "Company Name is a mandatory field. Please enter a value.").
    • Severity: Set the severity to "Error." This will prevent the user from saving the record if the field is empty.
    • On Validate: Check this box. This ensures the validation rule is executed when the record is saved.
  5. Save the Validation Rule: Click Save to activate the validation rule.
  6. Customize the Field Appearance (Using Zoho CRM’s Visual Editor): Zoho CRM doesn't natively provide a red border solely through validation rules. You'll need to use a workaround using Zoho's Deluge scripting feature within the Layout Editor. This is a more advanced step.
    • In the Layout Editor (from Step 1), select the mandatory field.
    • Click the Properties tab.
    • Look for an option related to "Appearance" or "Style." The exact wording may vary depending on your Zoho CRM version.
    • You'll need to add a Deluge script to conditionally apply a red border. The script will check if the field is empty. If it is, it will add a CSS class that defines the red border.
    • Example Deluge Script (This is a simplified example and may require adjustments based on your Zoho CRM version and theme): if(isEmpty(Company_Name)) { addStyle("border: 2px solid red;"); } Replace Company_Name with the actual API name of your field.
    • Save the Layout.
  7. Test the Configuration: Create a new record or edit an existing one. Attempt to save the record without filling in the mandatory field. Verify that:
    • The validation rule’s error message is displayed.
    • The field is highlighted with a red border (if the Deluge script is implemented correctly).

Common Mistakes

  • Incorrect API Name: Using the wrong API name in the validation rule will prevent it from working correctly. Double-check the API name in the module builder.
  • Missing 'Run on' Selection: Forgetting to select both "Create" and "Edit" in the validation rule will only trigger the rule when creating new records, not when editing existing ones.
  • Incorrect Deluge Script: Syntax errors or incorrect field names in the Deluge script will prevent the red border from appearing. Thoroughly test the script. The Deluge script functionality may not be available on all Zoho CRM editions.
  • Not Saving the Layout: After making changes in the Layout Editor, remember to save the layout. Otherwise, your changes will not be applied.
  • Confusing Field Labels with API Names: The user-friendly field label is different from the API name used in validation rules and Deluge scripts. Always use the API name.

Tips

  • Use Clear Error Messages: Provide users with specific and helpful error messages that explain why a field is mandatory.
  • Consider User Experience: While highlighting mandatory fields is important, avoid making the red border too distracting. A subtle border is generally preferable.
  • Apply to Multiple Fields: You can create validation rules and customize the appearance for multiple mandatory fields.
  • Test Thoroughly: Always test your configuration thoroughly to ensure that it works as expected and doesn't cause any unexpected issues.
  • Document Your Changes: Keep a record of the validation rules and layout customizations you make, so you can easily troubleshoot issues or make changes in the future.

Troubleshooting

  • Validation Rule Not Triggering: Double-check the API name, condition, and 'Run on' settings. Clear your browser cache and try again. Ensure the rule is enabled.
  • Red Border Not Appearing: Verify the Deluge script is correct and that the field is actually empty. Check for any conflicting CSS styles that might be overriding the border. Ensure the Deluge script functionality is available in your Zoho CRM edition.
  • Error Message Not Displaying: Ensure the validation rule severity is set to "Error." Check for any browser extensions or plugins that might be blocking error messages.
  • Inconsistent Behavior: Clear your browser cache and cookies. Try a different browser. Contact Zoho CRM support if the issue persists.
  • If that did not work: Confirm you have the necessary permissions to modify layouts and create validation rules. Try disabling other automation rules temporarily to rule out conflicts. Review the Zoho CRM documentation for validation rules and Deluge scripting.

Frequently Asked Questions

What is the API name of a field?

The API name is a unique identifier for a field within Zoho CRM. It's used in validation rules and Deluge scripts. You can find the API name in the module builder.

Can I use this method for custom fields?

Yes, this method works for both standard and custom fields in Zoho CRM.

Does this work on mobile?

The validation rule will work on mobile devices, preventing record saving if the mandatory fields are empty. The visual red border, however, is dependent on the Deluge script and might not render consistently across all mobile browsers and Zoho CRM mobile apps.

Can I change the color of the border?

Yes, you can change the color of the border in the Deluge script. Simply modify the CSS color code (e.g., `border: 2px solid blue;`).

Is Deluge scripting difficult to learn?

Deluge scripting has a learning curve, but Zoho CRM provides extensive documentation and examples to help you get started. Start with simple scripts and gradually work your way up to more complex ones.