Business Logic and Process Automation32% of the exam

Validation rule formulas and when rules run

How to write validation rule error conditions that return TRUE for bad data, the ISNEW, ISCHANGED, PRIORVALUE, ISBLANK and ISPICKVAL patterns, parent fields and roll-up counts in rules, and where rules run (API, Web-to-Case) and don't (Quick Create, Mass Transfer).

Official exam objective
Given a scenario, demonstrate the use of validation rules to meet stated business requirements.

~7 min read · 10 practice questions ·

What the exam expects

  • Write an error condition formula that returns TRUE for the invalid state, combining ISBLANK, ISPICKVAL and AND/OR correctly.
  • Limit a rule to new records (ISNEW), to changes (ISCHANGED) or to moves away from a value (PRIORVALUE).
  • Reference parent fields and roll-up summary counts in a rule, and place the error message.
  • Predict when rules run (edits, API, imports, Web-to-Case) and when they don't (Quick Create, Mass Transfer).
  • Choose a validation rule, a lookup filter or another tool for a data-quality requirement.

Key terms: error condition formula, the rule's formula, TRUE meaning the data is invalid; error location, where the message shows (top of page or next to a field); ISNEW, TRUE while a record is being created; ISCHANGED, TRUE when a field differs from its previous value; PRIORVALUE, the field's value before the edit.

Key facts

TRUE blocks the save
Detail
Error message shows when the formula returns True
All failing rules shown
Detail
Salesforce checks every rule and displays all errors at once
Layout and API independent
Detail
Rules apply even if fields aren't on the layout or in the API call
Quick Create
Detail
Validation rules don't apply
Mass Transfer
Detail
Rules don't run on transferred records
Web-to-Case and Web-to-Lead
Detail
Rules run first; only valid records are created
ISCHANGED on new records
Detail
Always FALSE
PRIORVALUE on new records
Detail
Returns the current value, not null
Roll-up fields in rules
Detail
Allowed; not as the error location
Sources for this section (4)
  • Why does choosing a field as the error location not change when the rule fires?
  • When are validation rules enforced during lead conversion?
  • What does ISNEW return while an existing record is edited, and what does that do to an AND(ISNEW(), ...) rule?
  • Why can a record hold a value that breaks an active validation rule?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the Platform App Builder pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 26 lessons of the Platform App Builder guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Inline practice questions and one-click topic practice (10 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the Platform App Builder exam