Skip to content

Formula Check examples

Example2 min read

Use these examples to build Record Health Checks with the Verify with a formula Evaluation Type. A formula Check passes when a Salesforce formula on the open record returns true. Choose it when every value the requirement needs is a field on the record or on a parent record, such as the Account’s Parent Account or Owner.

Each example is a set of instructions; the package does not install these Checks. You create each one in Setup, in Custom Metadata Types → Record Health Check → Manage Records.

ExampleQuestion it answersWhat it teaches
Check that an Account has a Phone or WebsiteDoes the Account have a Phone or a Website?OR() to accept either of two fields, and an edit link
Check that the billing address is completeAre Billing City, State, and Country all populated?AND() to require several fields, and a Found formula that names what is missing
Check partner Accounts for a billing countryDoes a channel partner Account have a Billing Country?An applicability formula that produces Skipped, and a count-only summary of passed Checks
Check the parent Account’s headquarters cityDoes the parent Account have a Billing City?A parent relationship field, and a link to the parent record
Check that an Account meets a minimum employee countIs Employees at least 10?A number comparison, with Found and Expected on every row
FieldWhat to enter
Evaluation TypeVerify with a formula
Pass ConditionA Salesforce formula that returns true to pass and false to fail, such as NOT(ISBLANK(BillingCity))
Applies ToAll records, or When a formula is true with an Applies When (Formula) that decides when the Check is skipped
Display: Found Formula, Display: Expected FormulaOptional formulas whose results the card shows as Found and Expected. They never change the result.

In a formula, ISBLANK() tests whether a field is empty, NOT() reverses true and false, AND() requires every condition, and OR() requires at least one. Write field API names, such as BillingCity, and put fixed text in quotation marks.

Without display formulas, a formula Check shows no Found and Expected values to most users. Users directly assigned Record Health Check Admin or Record Health Check Diagnostics Viewer see Expected with the Pass Condition formula itself.

Know when to choose another Evaluation Type

Section titled “Know when to choose another Evaluation Type”

A formula cannot read child records, such as an Account’s Contacts or Opportunities. Use a Query example for related records, a Compare two queries example when two lists or counts must agree, or an Apex example when the rule needs custom logic.

A formula reads data with the running user’s access. If the user cannot read a field in the formula, the Check shows Unable to Check rather than a guessed result, so test with the access of the people who will use the card.