Cert++
Close

Validation rule configuration and evaluation

Key Takeaway

A validation rule's formula returns True when the data is invalid. When it does, the record isn't saved and the user sees your error message.

Validation rules check that the data a user enters in a record meets your standards before the record can be saved. Each rule has two parts: a formula that evaluates one or more fields and returns True or False, and an error message for the user.

The formula and the error message

A validation rule's formula returns True when the data is invalid, which is the opposite of what many people expect. When the formula returns True, Salesforce blocks the save and shows the rule's error message. Write the formula to describe the bad data you want to stop, not the good data you want to allow.

You write the error message yourself. You also choose the error location: next to a specific field or at the top of the page. Like other error messages, validation rule errors appear in red text and begin with the word "Error".

For example, imagine that a record's close date must be after today. The bad data is a close date that is not after today, so you write the formula to return True in that case. When a user enters such a date and clicks Save, Salesforce blocks the save and shows a message such as "The close date must occur after today's date."

Platform Administrator Study Guide

Checklist progress

0/324Learned

Describe the capabilities and implications of data validation tools (duplicate and matching rules, validation rules)

0/12

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform Administrator studiers. 757 members and growing.