Validate configuration before activation
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.
What the action checks
Section titled “What the action checks”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.
Before you start
Section titled “Before you start”- Assign Record Health Check Admin to yourself. It includes access to the validation action.
- You need permission to create Flows.
Build the validation Flow
Section titled “Build the validation Flow”Build this Flow once and reuse it.
- In Setup, enter
Flowsin Quick Find, then select Flows. - Select New Flow, then select Autolaunched Flow (No Trigger).
- Add an Action element.
- Search for and select Validate Record Health Check Configuration.
- Enter
Validate_configurationas the API name, then select Done. - Save the Flow with the label Validate Record Health Check Configuration.
Leave the Flow inactive. You run it with Debug in Flow Builder.
Run a validation
Section titled “Run a validation”-
Open the Flow in Flow Builder.
-
Select Debug, then select Run.
-
In the debug details, find the action’s outputs:
Output Meaning Required before activation Configuration Is Valid truewhen no errors were foundtrueError Count The number of errors 0Warning Count The number of warnings Review each one Validation Report JSON Every error and warning, as a JSON list No errors -
If there are errors or warnings, read Validation Report JSON. Each entry has these properties:
Property Meaning severityERRORorWARNINGcomponentNameThe 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 -
Correct each problem in Setup, then debug the Flow again.
Result: Configuration Is Valid is true, and you have decided on every warning.
Validate a change safely
Section titled “Validate a change safely”- Save new Check Sets and Checks with Active cleared.
- Run the validation Flow and correct every error.
- 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.