Check that an Account has a Phone or Website
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.
Why a formula fits
Section titled “Why a formula fits”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.
Before you start
Section titled “Before you start”- 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
ANDinstead ofORin the formula.
Step 1: Create or choose the Check Set
Section titled “Step 1: Create or choose the Check Set”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.
| Field | Value |
|---|---|
| Label | Account Data Quality |
| Object | Account |
| Record Health Check Set Name | Account_ |
| Active | Cleared until validation succeeds |
| Card Title | Account Data Quality |
| Card Subtitle | Confirm the Account has a Phone or Website before outreach. |
| When Checks Run | When the user clicks Run |
Step 2: Create the Check
Section titled “Step 2: Create the Check”Open Setup → Custom Metadata Types, select Manage Records next to Record Health Check, select New, enter these values, and save.
| Field | Value |
|---|---|
| Label | Account Has Phone or Website |
| Check Set | Account Data Quality |
| Evaluation Type | Verify with a formula |
| Record Health Check Name | Account_ |
| Evaluation Order | 10 |
| Active | Cleared until validation succeeds |
| Pass Condition | OR(NOT(ISBLANK(Phone)), NOT(ISBLANK(Website))) |
| Check Title | Account has a Phone or Website |
| Check Description | Passes when the Account has a Phone, a Website, or both. |
| Message When Failed | {!record. |
| Fix Message | Add a verified business phone number or website, then run the Check again. |
| Failure Severity | Warning |
| Action Label | Edit Account |
| Action URL | /lightning/r/Account/{!record. |
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.
Step 3: Validate and activate
Section titled “Step 3: Validate and activate”- Run the Validate Record Health Check Configuration Flow action, as described in Validate configuration before activation, and correct every error.
- Activate the Check, then the Check Set.
- Add the Record Health Check component to the Account record page, select Account Data Quality (Account_Data_Quality), and activate the page.
- Assign Record Health Check Card User to the users who test the card.
Step 4: Test the Check
Section titled “Step 4: Test the Check”Use sandbox Accounts that you can edit. Select Run on the card for each case.
| Phone | Website | Result on the card |
|---|---|---|
| Blank | Blank | Warning, with the message, the fix message, and Edit Account |
| Populated | Blank | Pass |
| Blank | Populated | Pass |
| Populated | Populated | Pass |
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.
What users see
Section titled “What users see”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.
Resolve problems
Section titled “Resolve problems”| What you see | What to check |
|---|---|
| The Check Set is not in the Lightning App Builder list | The Check Set is active and its Object is Account. |
| The card has no row for the Check | The Check is active and its Check Set is Account Data Quality. |
| Unable to Check | The user can read Account, Phone, and Website. |
| Edit Account opens the wrong page | Action URL matches the table exactly, including {!record.. |