Check that an Account meets a minimum employee count
Create a Record Health Check that passes when an Account’s Employees value is at least 10, such as the minimum for a partner program, and shows the current count beside the minimum. The example uses the Verify with a formula Evaluation Type with display formulas for Found and Expected.
Why a formula fits
Section titled “Why a formula fits”Employees is a field on the Account, and the minimum is a number in the Check, so one formula can compare them. Use a Check rather than a Validation Rule because an Account below the minimum is still a valid Account; the result helps decide eligibility without blocking saves.
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 the approved minimum. This example uses 10.
- Decide what a blank Employees value means. This example treats it as 0, so a blank value fails.
- Confirm that the people who will use the card can read Employees. Its API name is
NumberOfEmployees.
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 meets the program’s minimum employee count. |
| When Checks Run | When the user clicks Run |
| Found/Expected Display | Show for every check |
Show for every check shows Found and Expected on passing rows too, so users always see the count and the minimum.
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 | Employee Count Meets Minimum |
| Check Set | Account Data Quality |
| Evaluation Type | Verify with a formula |
| Record Health Check Name | Employee_ |
| Evaluation Order | 50 |
| Active | Cleared until validation succeeds |
| Pass Condition | BLANKVALUE(NumberOfEmployees, 0) >= 10 |
| Check Title | Employee count meets the program minimum |
| Check Description | Passes when Employees is 10 or more. A blank value counts as 0. |
| Message When Failed | {!record. |
| Fix Message | If Employees is wrong, correct it and run the Check again. |
| Message When Unable To Evaluate | Unable to compare the employee count. |
| Failure Severity | Warning |
| Action Label | Edit employee count |
| Action URL | /lightning/r/Account/{!record. |
| Display: Found Formula | BLANKVALUE(NumberOfEmployees, 0) |
| Display: Expected Formula | 10 |
BLANKVALUE(NumberOfEmployees, 0) returns the employee count, or 0 when it is blank. To use a
different minimum, change 10 in both Pass Condition and Display: Expected Formula. Only
Pass Condition decides the result; the display formulas only show values.
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.
| Employees | Result on the card | Found | Expected |
|---|---|---|---|
| Blank | Warning | 0 | 10 |
| 9 | Warning | 9 | 10 |
| 10 | Pass | 10 | 10 |
| 25 | Pass | 25 | 10 |
Run one failing case as a user who cannot read Employees; the row shows Unable to Check instead of treating the value as 0.
What users see
Section titled “What users see”Every row shows Found, the Account’s employee count, and Expected, the minimum. A failed row also
shows Warning, the message, the fix message, and an Edit employee count link. Numbers use
the viewing user’s locale, so 1,250 can appear as 1,250 or 1.250.
Resolve problems
Section titled “Resolve problems”| What you see | What to check |
|---|---|
| Expected does not match the minimum | The number in Display: Expected Formula matches the one in Pass Condition. |
| Unable to Check | The user can read Employees. |
| Found and Expected appear only on failed rows | Found/Expected Display on the Check Set is Show for every check. |