Published at: 2025-10-30
Validation Rules
Validation Rules Usage Scenarios
When creating or editing data for an object, the system validates whether the entered information is legitimate or meets business requirements before saving. For example: When saving Account information, the system can validate whether the [Mobile Number] field meets requirements. If validation fails, you can configure whether to block the save operation in validation rules.
User Guide
2.1 Access Path
Preset Objects/Custom Object Management → Validation Rules
2.2 Basic Configuration of Validation Rules
Usage Scenarios
New Creation: Triggers validation when entering the create/edit page via the “New” button
Edit: Triggers validation when entering the edit page via the “Edit” button on the detail page
Validation Result Handling
If the validation result is
true, the system will:Block with Alert: Display the configured message and prevent saving
Warn without Blocking: Display the message but allow users to choose whether to proceed
2.3 Advanced Configuration
Advanced Mode:
Enable this mode to configure fields from the Primary Object and lookup-related objects. Note: Using statistical or formula fields from related objects may cause delays in rule activation after configuration.
2.4 AI-Powered Formula Generation
After adding a rule, trigger the AI Formula Assistant by typing “/” or clicking the AI button.
picture coming soon:Enter a formula description, and the AI will generate the formula automatically.
picture coming soon:Click Copy or Apply to use the AI-generated formula.
picture coming soon:
2.5 Handling Empty Values in Formulas
For non-numeric, non-currency, and non-percentage fields, the “Default to Zero When Field Is Empty” option does not apply. Empty values in calculations or logical operations will cause errors. Use the ISNULL function to handle empty values explicitly.
picture coming soon:
Supported Field Types:
Currency, Date, DateTime, Email, Address, Text Area, Decimal, Number, Percentage, Phone, Picklist, Text, Boolean, URL
Geolocation, Check-in, Payment components
Formula fields, Roll-up fields, and related object formula/roll-up fields
Supported Functions:
Return Type | Operator/Function | Parameters | Description | Example |
|---|---|---|---|---|
Generic |
| - | Specifies operator precedence |
|
Depends on Input |
| 3 params: 1st=Boolean, 2nd/3rd=same type | Returns |
|
|
| Variable params: | Returns |
|
|
| 2 params: 1st=Boolean, 2nd=any type | Returns |
|
Numeric |
| 2 numeric/currency/percentage params | Performs arithmetic operations |
|
|
| 2 date params (returns days) | Calculates date difference in days |
|
|
| 1 text param | Converts text to number (returns null if invalid) |
|
Date/DateTime |
| 1 date/datetime param | Extracts year/month/day component |
|
Text |
| 2 text params | Concatenates strings |
|
Boolean |
| Boolean params | Logical operators |
|
|
| 1 param of any type | Checks for null values |
|
2.6 Notes
Multiple validation rules execute sequentially by creation time.
Rules can be enabled/disabled. Disabled rules won’t trigger.
Troubleshooting Validation Rules
3.1 Roll-up Fields in Validation Rules Not Triggering
#### Scenario:
1. Rule blocks edits but not new creations.
2. Roll-up fields meet conditions during creation but don’t trigger validation.Root Cause:
Validation rules using roll-up fields from lookup-related objects may reference stale data during edits (previous saved values) or miss new data during creation.
Solution:
Use pre-validation functions in save buttons instead.
picture coming soon:
Example:
An order detail rule blocks saves if Available Quantity < 0. Despite showing -10 during creation, the save succeeds because the roll-up field isn’t validated in real-time.
picture coming soon:
3.2 Owner Department Validation Fails
#### Scenario:
Rules using the owner’s primary department (or related object owner’s department) don’t block saves.Root Cause:
Owner department fields populate after validation during creation.
Solution:
Configure pre-validation functions to fetch department data via owner ID.
picture coming soon:
3.3 Empty Values in Formula Fields
#### Scenario:
A rule blocks saves if Order Amount (Original Currency) <= 0, but empty values bypass validation.Solution:
Enable Default to Zero When Field Is Empty for numeric fields.
picture coming soon:
Note: For non-numeric fields, use ISNULL to handle empty values.
picture coming soon: