Skip to content
Suggest a correction

Check that an Account has a Phone or Website

Example4 min read

Create a Record Health Check that passes when an Account has a Phone number, a Website, or both, and asks the user to add one when both are blank. The example uses the Verify with a formula Evaluation Type, so it needs no code.

Phone and Website are fields on the Account that is open, so a Salesforce formula can read both. A formula Check is the simplest Evaluation Type. Use a Check rather than a Validation Rule because a missing phone number should be fixed before outreach, not block every other Account update.

  • Install Record Health Check, and assign yourself Record Health Check Admin and the Salesforce Customize Application permission.
  • Confirm that the people who will use the card can read the Phone and Website fields.
  • Decide whether either field is enough. This example accepts either one. If your requirement needs both, use AND instead of OR in the formula.

You can add the Check to an Account Check Set you already have. To create one, open Setup → Custom Metadata Types, select Manage Records next to Record Health Check Set, select New, enter these values, and save. Leave other fields at their defaults.

FieldValue
LabelAccount Data Quality
ObjectAccount
Record Health Check Set NameAccount_Data_Quality
ActiveCleared until validation succeeds
Card TitleAccount Data Quality
Card SubtitleConfirm the Account has a Phone or Website before outreach.
When Checks RunWhen the user clicks Run

Open Setup → Custom Metadata Types, select Manage Records next to Record Health Check, select New, enter these values, and save.

FieldValue
LabelAccount Has Phone or Website
Check SetAccount Data Quality
Evaluation TypeVerify with a formula
Record Health Check NameAccount_Has_Phone_Or_Website
Evaluation Order10
ActiveCleared until validation succeeds
Pass ConditionOR(NOT(ISBLANK(Phone)), NOT(ISBLANK(Website)))
Check TitleAccount has a Phone or Website
Check DescriptionPasses when the Account has a Phone, a Website, or both.
Message When Failed{!record.Name fallback="This Account"} has no Phone or Website for outreach.
Fix MessageAdd a verified business phone number or website, then run the Check again.
Failure SeverityWarning
Action LabelEdit Account
Action URL/lightning/r/Account/{!record.Id}/edit

The formula tests only whether a value is present. A placeholder such as www.example.com passes. If the format or validity of the value matters, use a query or Apex Check instead.

  1. Run the Validate Record Health Check Configuration Flow action, as described in Validate configuration before activation, and correct every error.
  2. Activate the Check, then the Check Set.
  3. Add the Record Health Check component to the Account record page, select Account Data Quality (Account_Data_Quality), and activate the page.
  4. Assign Record Health Check Card User to the users who test the card.

Use sandbox Accounts that you can edit. Select Run on the card for each case.

PhoneWebsiteResult on the card
BlankBlankWarning, with the message, the fix message, and Edit Account
PopulatedBlankPass
BlankPopulatedPass
PopulatedPopulatedPass

Run one failing case as a user who cannot read Website. The row shows Unable to Check, because Record Health Check does not treat an unreadable field as blank.

A failed row shows the Warning label, the message with the Account Name, the fix message, and an Edit Account link that opens the Account’s edit page. This Check has no Display: Found Formula or Display: Expected Formula, so most users see no Found and Expected values. Users directly assigned Record Health Check Admin or Record Health Check Diagnostics Viewer see Expected with the Pass Condition formula.

What you seeWhat to check
The Check Set is not in the Lightning App Builder listThe Check Set is active and its Object is Account.
The card has no row for the CheckThe Check is active and its Check Set is Account Data Quality.
Unable to CheckThe user can read Account, Phone, and Website.
Edit Account opens the wrong pageAction URL matches the table exactly, including {!record.Id}.