Skip to content

Create your first Check

Getting started8 min read

Build a working Record Health Check in a Salesforce sandbox without code. You create a Check Set and one formula Check that asks “Does this Account have a Billing City?”, validate the configuration, add the card to an Account record page, and confirm that it passes and fails as expected.

Record Health Check stores its configuration as two Custom Metadata Types. A Record Health Check Set record, called a Check Set, defines one card for one object. A Record Health Check record, called a Check, defines one requirement on that card.

You need:

  • Record Health Check installed in a sandbox. See Install Record Health Check in a sandbox.
  • The Record Health Check Admin Permission Set.
  • The Salesforce Customize Application permission, which Record Health Check Admin does not include. You need it to create Custom Metadata records in Setup.
  • Permission to edit Lightning record pages in Lightning App Builder.
  • An Account in the sandbox that you can edit.
  • A second user for testing who has the Record Health Check Card User Permission Set and Read access to Account and the Billing City field. Results depend on the running user’s access, so test as a user who has the same access as the people who will use the card.

You do not need Apex or the Salesforce CLI.

RecordLabelAPI name (Developer Name)Purpose
Record Health Check SetAccount ReadinessAccount_ReadinessDefines the card on Account record pages
Record Health CheckBilling City Is PopulatedBilling_City_Is_PopulatedPasses when Billing City has a value, and fails when blank

You create both records inactive, validate them, and then activate them. Keeping them inactive until validation succeeds keeps unfinished configuration away from users.

  1. In Setup, enter Custom Metadata Types in Quick Find, then select Custom Metadata Types.

  2. Next to Record Health Check Set, select Manage Records.

  3. Select New.

  4. Enter these values. Leave every other field at its default.

    FieldValue
    LabelAccount Readiness
    Record Health Check Set NameAccount_Readiness
    ObjectAccount
    Card TitleAccount Readiness
    When Checks RunWhen the user clicks Run
    Card Heading DisplayShow title and subtitle
    Run Button DisplayShow label and icon
    Summary DisplayShow below checks
    ActiveCleared
  5. Select Save.

Record Health Check Set Name is the record’s API name. Flow, Apex, and Checks refer to the Check Set by this name. Object must be the object’s API name, spelled exactly as Salesforce spells it. When the user clicks Run makes the card wait for you to select Run, so you can see exactly when the result changes during the test.

Result: The Account Readiness Check Set appears in the list with Active cleared.

  1. Return to Custom Metadata Types.

  2. Next to Record Health Check, select Manage Records.

  3. Select New.

  4. Enter these values. Leave every other field at its default.

    FieldValue
    LabelBilling City Is Populated
    Record Health Check NameBilling_City_Is_Populated
    Check SetAccount Readiness
    Check TitleBilling City is populated
    Evaluation TypeVerify with a formula
    Pass ConditionNOT(ISBLANK(BillingCity))
    Failure SeverityWarning
    Message When Failed{!record.Name fallback="This Account"} is missing a Billing City.
    Fix MessageAdd the Billing City, save the Account, and run the Check again.
    Action LabelEdit Account
    Action URL/lightning/r/Account/{!record.Id}/edit
    Evaluation Order10
    ActiveCleared
  5. Select Save.

What these values do:

  • Pass Condition is a Salesforce formula that runs against the open Account. It returns true, which is a pass, when Billing City has a value.
  • {!record.Name fallback="This Account"} is a merge token. The card replaces it with the Account Name. If the running user cannot read the Name, the card shows “This Account” instead.
  • Action URL opens the standard edit page for the same Account. {!record.Id} becomes the Account ID. The link only opens the page; it saves nothing.
  • Failure Severity set to Warning makes a failed result show the Warning label in amber.

Result: The Billing City Is Populated Check appears in the list with Active cleared.

Record Health Check includes a Flow action, Validate Record Health Check Configuration, that checks every Check Set and Check, including inactive ones. It reports problems such as missing required values, settings that cannot work together, invalid merge tokens, unusable formulas or queries, a missing Apex class, and prerequisite Checks that are missing or circular. It reads only configuration, never business records.

If you already have a validation Flow, open it and select Debug, then go to step 8.

  1. In Setup, enter Flows in Quick Find, then select Flows.

  2. Select New Flow, then select Autolaunched Flow (No Trigger).

  3. Add an Action element.

  4. Search for and select Validate Record Health Check Configuration.

  5. Enter Validate_configuration as the API name, then select Done.

  6. Save the Flow as Validate Record Health Check Configuration. Do not activate it.

  7. Select Debug, then select Run.

  8. In the debug details, review the action’s outputs.

    OutputRequired result
    Configuration Is Validtrue
    Error Count0
    Warning CountAny number. Read each warning in Validation Report JSON and decide whether to fix it.
  9. If Error Count is greater than zero, find each error in Validation Report JSON. Each entry names the record in componentName, the field in fieldName, and the problem in message. Correct the record in Setup, and then debug the Flow again.

Result: Configuration Is Valid is true.

  1. Open Custom Metadata Types → Record Health Check Set → Manage Records, select Edit next to Account Readiness, select Active, and save.
  2. Open Custom Metadata Types → Record Health Check → Manage Records, select Edit next to Billing City Is Populated, select Active, and save.

Step 5: Add the card to the Account record page

Section titled “Step 5: Add the card to the Account record page”
  1. Open an Account record.
  2. Select the gear icon, then select Edit Page. Lightning App Builder opens.
  3. In the Components panel, search for Record Health Check, and drag the component onto the page.
  4. In the component properties, set Check Set to Account Readiness (Account_Readiness). The list shows each Check Set’s label followed by its API name.
  5. Select Save.
  6. If Salesforce asks you to activate the page, select Activate, and assign it as the default for the app, record types, and profiles that your test user uses. If the page is already active for those users, no activation is needed.
  7. Select the back arrow to return to the Account, and refresh the browser.

Result: The card shows the title Account Readiness and a Run button.

If Account Readiness is not in the Check Set list, confirm that the Check Set is active and that its Object is Account. The list shows only active Check Sets for the page’s object.

Log in as the test user, or ask that user to run these tests on an Account they can edit.

TestStepsExpected result on the card
FailClear Billing City, save the Account, then select Run.The row shows Warning, the message “[Account Name] is missing a Billing City.”, the Edit Account link, and the fix message. The summary shows 1 Warning.
PassEnter a Billing City and save the Account.The card runs again by itself after the save, because it has already completed a run. The row shows Pass, and the summary shows 1 Passed. Select Rerun if the result does not change.

During the fail test, select Edit Account and confirm that it opens the edit page for the same Account. Restore the Account’s original Billing City when you finish.

When you test as an administrator assigned Record Health Check Admin, the failed row also shows Expected with the formula NOT(ISBLANK(BillingCity)). Users without diagnostic access do not see the formula. To show Found and Expected values to every user, add Display: Found Formula and Display: Expected Formula to the Check.

What you seeWhat to do
The card is not on the pageOpen Edit Page → Activation and confirm the page is assigned to the test user’s app, record type, and profile.
Account Readiness is not in the pickerConfirm the Check Set is active and Object is exactly Account.
The card says it doesn’t contain any active ChecksConfirm the Check is active and its Check Set is Account Readiness.
The row shows Unable to CheckConfirm the running user can read the Account and the Billing City field.
The card says you don’t have access to view or run Record Health CheckAssign Record Health Check Card User to the running user.
A Setup change does not appearSelect Run or Rerun. Each run reads the configuration again, so you do not need to reload the page.