How to implement data quality checks in salesforce
- George Apostolov
- 05 Sep 2025
Guide
Go to Setup on the top right.
Search for Object Manager in the Quick Find.
Select the object you want to enforce the rule on (Leads, Opportunities etc).
Find the Validation Rules section and click on it.
Click New to initiate the creation of a new validation rule.
Start defining the rules for Labels and Error Condition Formula.
Label: Give your rule a clear name (e.g., "Opportunity Requires Amount").
Select Active to make the rule enforceable.
Error Message: Craft a clear message displayed to users when the validation fails (e.g., "Please enter an amount for Closed Won opportunities").
Error Condition Formula: This is the key part. Use the formula builder to define the criteria that must be met to avoid an error message.
An example formula to ensure the amount is filled for opportunities marked as "Closed Won":
ISPICKVAL(PRIORVALUE(StageName), "Closed Won") && Amount == null
Click Save to create the validation rule.
Create your first interactive demo in minutes
No credit card required • Start building today


