Skip to content
Suggest a correction

Check that an Account meets a minimum employee count

Example4 min read

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.

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.

  • 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.

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 meets the program’s minimum employee count.
When Checks RunWhen the user clicks Run
Found/Expected DisplayShow for every check

Show for every check shows Found and Expected on passing rows too, so users always see the count and the minimum.

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

FieldValue
LabelEmployee Count Meets Minimum
Check SetAccount Data Quality
Evaluation TypeVerify with a formula
Record Health Check NameEmployee_Count_Meets_Minimum
Evaluation Order50
ActiveCleared until validation succeeds
Pass ConditionBLANKVALUE(NumberOfEmployees, 0) >= 10
Check TitleEmployee count meets the program minimum
Check DescriptionPasses when Employees is 10 or more. A blank value counts as 0.
Message When Failed{!record.Name fallback="This Account"} has fewer employees than the program minimum.
Fix MessageIf Employees is wrong, correct it and run the Check again. Otherwise the Account does not meet the minimum.
Message When Unable To EvaluateUnable to compare the employee count. Confirm that you can read Employees.
Failure SeverityWarning
Action LabelEdit employee count
Action URL/lightning/r/Account/{!record.Id}/edit
Display: Found FormulaBLANKVALUE(NumberOfEmployees, 0)
Display: Expected Formula10

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.

  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.

EmployeesResult on the cardFoundExpected
BlankWarning010
9Warning910
10Pass1010
25Pass2510

Run one failing case as a user who cannot read Employees; the row shows Unable to Check instead of treating the value as 0.

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.

What you seeWhat to check
Expected does not match the minimumThe number in Display: Expected Formula matches the one in Pass Condition.
Unable to CheckThe user can read Employees.
Found and Expected appear only on failed rowsFound/Expected Display on the Check Set is Show for every check.