Skip to content
Suggest a correction

Validate configuration before activation

Guide3 min read

Check every Record Health Check Set and Check in your org for configuration errors before you activate them. Record Health Check includes a Flow action, Validate Record Health Check Configuration, that reviews active and inactive records together, so you can validate a new or changed Check while it is still inactive.

The action reads only Record Health Check configuration. It does not evaluate business records or change anything.

The action reports problems such as:

  • a required value that is missing for the selected Evaluation Type;
  • a picklist value that is not recognized;
  • settings that cannot work together, such as When the user clicks Run with a hidden heading or a hidden Run button;
  • merge tokens, formulas, or queries that cannot be used;
  • an Apex class that cannot be found;
  • a Prerequisite Check that names a Check that does not exist, or that is part of a circular dependency; and
  • more than 25 Checks in one Check Set. This count includes inactive Checks, although a run counts only active ones, so a Check Set with 25 active Checks and an inactive draft fails validation.

It also returns warnings for settings that are valid but probably not what you intended, such as Display: Found Text on an Apex Check, which an Apex Check ignores.

  • Assign Record Health Check Admin to yourself. It includes access to the validation action.
  • You need permission to create Flows.

Build this Flow once and reuse it.

  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 with the label Validate Record Health Check Configuration.

Leave the Flow inactive. You run it with Debug in Flow Builder.

  1. Open the Flow in Flow Builder.

  2. Select Debug, then select Run.

  3. In the debug details, find the action’s outputs:

    OutputMeaningRequired before activation
    Configuration Is Validtrue when no errors were foundtrue
    Error CountThe number of errors0
    Warning CountThe number of warningsReview each one
    Validation Report JSONEvery error and warning, as a JSON listNo errors
  4. If there are errors or warnings, read Validation Report JSON. Each entry has these properties:

    PropertyMeaning
    severityERROR or WARNING
    componentNameThe Developer Name of the Check Set or Check
    fieldNameThe API name of the field with the problem, when there is one
    messageWhat is wrong and how to correct it
    reasonCodeA stable code for the problem, such as MISSING_REQUIRED_FIELD
    offendingTokenThe merge token or formula text that caused the problem, when known
    startOffsetFor a formula problem, where the problem starts in the formula
    endOffsetFor a formula problem, where the problem ends in the formula
    diagnosticDetailFor a formula problem, more detail about the cause, when known
  5. Correct each problem in Setup, then debug the Flow again.

Result: Configuration Is Valid is true, and you have decided on every warning.

  1. Save new Check Sets and Checks with Active cleared.
  2. Run the validation Flow and correct every error.
  3. Activate the Checks, then activate the Check Set last.

The action validates every Check Set and Check in the org at once, including inactive ones, so an error in an unrelated record also makes Configuration Is Valid false. Use componentName to find the records you are working on. Deactivating a record does not remove its errors; correct it, or delete a draft you no longer need.