Skip to content

Check fields

Detailed page. Use “On this page” to jump directly to the section you need.

Find every Record Health Check metadata field by its Salesforce label or API name.

Look up every Check field by its Setup label or API name. Each field explains when to use it, what to enter, and what happens when the Check runs.

Setup valueName
Custom Metadata Type labelRecord Health Check
Custom Metadata Type API nameRecord_Health_Check__mdt

Create or review a Check in Setup → Custom Metadata Types → Record Health Check → Manage Records. Start with the decision tables below. Open an individual field only when that field applies to the Evaluation Type you chose.

For a Formula-only Check, use the identity and message fields plus Pass Condition and ignore the SOQL, Compare Two Queries, and Apex sections. Query configuration requires someone who can review SOQL safely. Verify with Apex, Apex Class, and Apex Parameters (JSON) require a developer to own the class, tests, and deployment.

StageDecisionStart with
1. Place the CheckWhich Check Set owns it, when does it run, and is it active?Check Set, Evaluation Order, and Active
2. Decide whether it appliesDoes it run for every record, only when a formula or query matches, or only after another Check passes?Applies To and Prerequisite Check
3. Choose how it evaluatesCan Salesforce formula or SOQL express the check, or is Apex required?Evaluation Type
4. Define the decisionWhat value is found, what is expected, and how are they compared?The Evaluation Type table below
5. Explain the resultWhat should someone understand and do after a failure or an unable result?Check Title, Message When Failed, and Fix Message
6. Add a next actionWould a safe same-org destination help resolve the result?Action Label and Action URL
7. Publish when neededDoes another process need the finalized Check outcome?Publish User Result Event
What the Check must verifyEvaluation TypeStart with
Fields on the current Salesforce recordVerify with a formula (FORMULA)Pass Condition
Records or an aggregate returned by one SOQL queryVerify with a query (QUERY)Source Query and Comparison Operator
One SOQL result against another SOQL resultCompare two queries (COMPARE_TWO_QUERIES)Source Query and Comparison Query
Logic implemented in a package or org Apex classVerify with Apex (APEX)Apex Class

For complete configurations, choose an example by Evaluation Type. For text that adapts to the record and result, use Merge Syntax: record.*, rhcResult.*, rhcRun.*, rhcCheck.*, and rhcSet.*.

Prerequisite Check stores the prerequisite’s Developer Name within the same Check Set, not its card title. Card Publish User Result Event controls explicit Run/Rerun only; Flow and Apex publication values control programmatic runs. Action links render only for FAIL, not System Error or Unable to Check rows.

Setup labelAPI nameGroup
Developer NameDeveloperNameIdentity and execution
LabelMasterLabelIdentity and execution
Check SetRecord_Health_Check_Set__cIdentity and execution
Evaluation OrderEvaluationOrder__cIdentity and presentation
ActiveIsActive__cIdentity and execution
Check TitleCheckTitle__cWhat users see
Check DescriptionCheckDescription__cWhat users see
CategoryCategory__cWhat users see
Failure SeverityFailureSeverity__cWhat users see
Message When FailedFailureMessage__cWhat users see
Message When Unable To EvaluateUnableToEvaluateMessage__cWhat users see
Fix MessageFixMessage__cWhat users see
Action LabelActionLabel__cWhat users see
Action URLActionUrl__cWhat users see
Evaluation TypeEvaluationType__cCheck type and value display
Display: Value FormatDisplayValueFormat__cCheck type and value display
Show Found and ExpectedComparisonDisplayMode__cCheck type and value display
Pass ConditionPassConditionFormula__cCheck fields on this record (FORMULA)
Display: Found FormulaDisplayFoundFormula__cOptional result display
Display: Expected FormulaDisplayExpectedFormula__cOptional result display
Formula Result TypeFormulaResultType__cQuery comparison formulas
Source QuerySourceQuery__cQuery sources (QUERY / COMPARE_TWO_QUERIES)
Source Query FieldSourceQueryField__cQuery sources (QUERY / COMPARE_TWO_QUERIES)
Comparison QueryComparisonQuery__cQuery sources (QUERY / COMPARE_TWO_QUERIES)
Comparison Query FieldComparisonQueryField__cQuery sources (QUERY / COMPARE_TWO_QUERIES)
Value to find in the list (formula)FindInListFormula__cQuery sources (QUERY / COMPARE_TWO_QUERIES)
Comparison OperatorComparisonOperator__cQuery comparison
Expected Value Comes FromExpectedValueSource__cQuery comparison
Expected Value (Fixed)ExpectedFixedValue__cQuery comparison
Expected Currency ISO CodeExpectedCurrencyIsoCode__cQuery comparison
Expected Value (Formula)ExpectedRecordFormula__cQuery comparison
How To Read Query ResultsQueryResultHandling__cAdvanced query behavior
If Query Finds No RecordsNoRowsResult__cAdvanced query behavior
If Field Value Is EmptyEmptyValueHandling__cAdvanced query behavior
Max Query Rows (1-2000)MaxQueryRows__cAdvanced query behavior
Display: Found TextDisplayFoundText__cAdvanced display text
Display: Expected TextDisplayExpectedText__cAdvanced display text
Applies ToApplicabilityMode__cWhen this check applies
Applies When (Formula)ApplicabilityFormula__cWhen this check applies
Applies When (Count Query)ApplicabilityCountQuery__cWhen this check applies
Message When Not ApplicableApplicabilityNotMetMessage__cFriendly explanation for a skipped check
Count Must BeApplicabilityCountOperator__cWhen this check applies
Count ValueApplicabilityCountThreshold__cWhen this check applies
Prerequisite CheckPrerequisiteCheck__cWhen this check applies
Apex ClassApexClass__cCustom Apex (APEX)
Apex Parameters (JSON)ApexParametersJson__cCustom Apex (APEX)
Publish User Result EventPublishUserResultEvent__cLifecycle events

Required Text(40). This is the stable name Salesforce uses for the Custom Metadata record. A prerequisite Check refers to this value, not the Check Title shown on the card. Example: Account_Pipeline_Readiness.

After saving, Setup shows the complete Qualified API Name. A Check created by an administrator in your org normally has a name such as Account_Pipeline_Readiness. A Check included with the installed package can have a name such as rhc__Account_Has_Recent_Activity. Copy the exact value from Setup; do not add or remove rhc__.

Required Text(80). This identifies the Custom Metadata record in Setup. It is not the title users see on the card; configure that in Check Title. Example: Account pipeline readiness.

Required Metadata Relationship. Select the Check Set that owns this Check. Each Check belongs to one Check Set, and that Check Set determines the Salesforce object and card behavior.

For example, select your Account_Readiness Check Set for a Check that evaluates Account records.

Optional Number(4,0). The default is 100. Checks with lower numbers appear first. When two Checks have the same number, Salesforce orders them by Developer Name. Prerequisite references, not this field, determine dependency scheduling.

Use values such as 10, 20, and 30 so a new Check can be inserted later. Evaluation Order is presentation order. Prerequisites are scheduled from their dependency references even when they appear later.

Checkbox, selected by default. Clear it to stop this Check from running without deleting its Custom Metadata record. Other active Checks in the Check Set continue to run.

Required Text(255). This is the title users see for the Check on the card. Use a short statement that makes the requirement obvious, such as Billing City is present or Account has an active Contact. This is separate from Label and Developer Name, which identify the record in Setup.

Optional Text(255). This additional explanation appears when a user hovers over the Check Title or moves keyboard focus to it. Explain what is checked and why it matters. It does not appear inline in the row. Example: Checks open Opportunity count and pipeline amount.

Optional restricted picklist. Category classifies the business purpose of a Check. It does not change the result, severity, or evaluation order. After a run, categorized Checks produce grouped category summaries that replace the single overall totals bar. The Check Set’s Summary Display setting places those groups above or below the Check rows.

Setup choiceStored value
CompletenessCOMPLETENESS
ConsistencyCONSISTENCY
TimelinessTIMELINESS
EligibilityELIGIBILITY
ReadinessREADINESS
RiskRISK
ComplianceCOMPLIANCE
Relationship coverageRELATIONSHIP_COVERAGE

Optional restricted picklist. It applies only when the result is FAIL; it does not change PASS, SKIPPED, UNABLE_TO_EVALUATE, or ERROR.

Setup choiceStored valueCard color
CriticalCRITICALRed
WarningWARNINGAmber; default
InfoINFOBlue

Choose the business impact of failing the requirement. ERROR is not a severity choice because it is a separate result that means Record Health Check encountered a technical problem.

Optional Long Text Area(32,768), shown for FAIL. Explain what requirement was not met in language the card user understands. Do not include SOQL, formulas, or exception details.

This field supports merge tokens. Press Enter for a new line on the card.

Choose the shortest useful example for the Check:

Found {!rhcResult.foundValue}; expected {!rhcResult.expectedValue}.
{!rhcResult.failedRecordCount} of {!rhcResult.totalRecordCount} contacts for {!record.Name} are missing email.

Message When Unable To Evaluate (UnableToEvaluateMessage__c)

Section titled “Message When Unable To Evaluate (UnableToEvaluateMessage__c)”

Optional Long Text Area(32,768). It replaces the standard message for UNABLE_TO_EVALUATE. Explain that Salesforce could not determine the result and what the user should do next. Do not show a query, formula, or technical error on the card. Merge tokens and line breaks are supported.

Examples:

We could not confirm the requirement for {!record.Name} ({!rhcResult.reasonCode}).
Try again later. If the problem continues, give support run {!rhcRun.runId}, started at {!rhcRun.startedAt}.

Optional Long Text Area(32,768), shown in failed-Check details. Tell the user exactly what to review or change. Pair it with Action URL when Salesforce can take the user directly to the relevant record, related list, report, or instructions. Merge tokens are supported.

Examples:

Ask {!record.Owner.Name} to update the phone number for {!record.Name}; the current value is {!record.Phone fallback="not provided"}.
Review the open Opportunities and correct their Amount values, then rerun {!rhcSet.cardTitle}.

Optional Text(80) for the failure action link. Use a short verb phrase that describes where the link goes, such as Edit Account, Review Contacts, or Open playbook. It supports merge tokens.

Action URL controls whether the link appears. When a URL is present and Action Label is blank, the card uses Fix this.

Examples:

Review {!record.Name}
Review Contacts

Optional Long Text Area(32,768), displayed only for FAIL. Use a Salesforce path beginning with / or an approved https:// address. You can link to a record, edit page, related list, report, Knowledge article, or external playbook.

Record, Check, Check Set, and run tokens are supported and URL-encoded automatically. Result tokens are not allowed in URLs. The card hides blank, unsafe, or overlong resolved URLs.

Examples:

/lightning/r/Account/{!record.Id}/view
/lightning/r/Account/{!record.Id}/edit
/lightning/r/Account/{!record.Id}/related/Contacts/view
/lightning/o/Contact/new?defaultFieldValues=AccountId={!record.Id},LastName=New%20contact
/lightning/o/Case/new?defaultFieldValues=AccountId={!record.Id},Subject=Review%20{!record.Name fallback="this account"},Origin=Web,Description=Check%20{!rhcCheck.developerName}%20in%20{!rhcSet.developerName}

Required restricted picklist with no default. Choose one Evaluation Type, then complete only the fields that type uses.

Setup choiceStored valueUse it when
Verify with a formulaFORMULAA true/false Salesforce formula can check fields on the current record. Configure Pass Condition.
Verify with a queryQUERYOne SOQL query can return the related records, count, total, or value to compare.
Compare two queriesCOMPARE_TWO_QUERIESThe result from one SOQL query must be compared with another query result.
Verify with ApexAPEXThe requirement needs Apex logic that the other types cannot express. Configure Apex Class.

Show Found and Expected (ComparisonDisplayMode__c)

Section titled “Show Found and Expected (ComparisonDisplayMode__c)”

Optional restricted picklist, default Automatic (AUTOMATIC). It decides which comparison evidence the Lightning card may show for this Check. Leaving it blank is the same as Automatic, so Checks created before this field existed keep their current behavior.

Setup choiceStored valueCard behavior
AutomaticAUTOMATICFound and Expected appear exactly as they do today.
Show found onlyFOUND_ONLYOnly the Found value can appear.
Show expected onlyEXPECTED_ONLYOnly the Expected value can appear.
HideHIDDENNeither value appears, inline or behind the caret.

This setting filters what is eligible to appear. It does not force a value to appear when the Check Set’s Found/Expected display placement would normally keep it hidden, and it applies to Formula, Query, Compare Two Queries, and Apex Checks alike.

When nothing remains visible, the card also removes the comparison divider, the caret, the expanded comparison region, and the Found/Expected phrases in the row’s accessible label. The failure message, Fix Message, action link, status, severity, title, description, and summary pills are unaffected.

Hide is not a security control. The evaluation result still carries both values, and they remain available to Apex, Flow, Platform Events, saved results, merge tokens, and authorized diagnostics. Use field-level security and sharing to protect data, never this setting.

If you choose Hide for a Check that has no failure message, Fix Message, or Action URL, validation reports a non-blocking warning: a failing Check would otherwise show the user a bare failure with no explanation. Evaluation still runs.

Display: Value Format (DisplayValueFormat__c)

Section titled “Display: Value Format (DisplayValueFormat__c)”

Optional restricted picklist, default Automatic (AUTO). It changes only how Found and Expected values appear; it never changes whether the Check passes.

Setup choiceStored valueExample use
AutomaticAUTOLet Record Health Check choose from the value type.
NumberNUMBEREmployee count
CurrencyCURRENCYAnnual Revenue
PercentPERCENTA Salesforce Percent field
Ratio as percentRATIO_PERCENTShow 0.25 as 25%
CheckboxBOOLEANTrue or false
DateDATEA date without time
Date/TimeDATETIMEA date and time
TextTEXTA name or description
RawRAWAn external ID without display formatting

This is a different setting from Formula Result Type, which declares the type a formula returns so the Check can calculate with it. A Formula Check can set Formula Result Type to Number and Display: Value Format to Currency at the same time.

Naming a format that cannot apply to a value is not an error. The value keeps its original spelling. Full contract: Reference: Display value format.

Long Text Area(32,768), required only for Verify with a formula. Enter a Salesforce formula that returns true to pass or false to fail. Do not enter Apex or SOQL.

Examples:

FormulaWhat passes
TRUEEvery evaluated record
NOT(ISBLANK(BillingCity))Billing City is populated
OR(NOT(ISBLANK(Phone)), NOT(ISBLANK(Website)))Phone or Website is populated
AnnualRevenue >= 100000Annual Revenue is at least 100,000
ISPICKVAL(Type, "Customer")Type is Customer
NOT(ISBLANK(ParentId))A Parent Account is assigned

Display: Found Formula (DisplayFoundFormula__c)

Section titled “Display: Found Formula (DisplayFoundFormula__c)”

Optional Long Text Area(32,768) for Formula Checks. This formula supplies the Found value shown on the card; it does not affect pass or fail. Leave it blank when the card does not need a Found value.

Enter a formula evaluated on the current record. Fixed text uses double quotes, numbers are unquoted, and Boolean values use TRUE or FALSE. Record Health Check detects each display formula’s return type automatically; Formula Result Type does not control it.

Examples:

FormulaDetected result typeDisplayed value
"Hello"TextHello
NameTextThe current record’s Name
Parent.NameTextThe parent Account’s Name
Name & " - " & TEXT(Type)TextA combined value such as Acme - Customer
IF(ISBLANK(Phone), "Missing", Phone)TextMissing or the current Phone
BLANKVALUE(NumberOfEmployees, 0)NumberEmployee count, with blank shown as 0
AnnualRevenueNumberCurrent Annual Revenue
TODAY()DateThe current date
NOW()Date/TimeThe current date and time
NOT(ISBLANK(Website))Checkboxtrue when Website is populated

Display: Expected Formula (DisplayExpectedFormula__c)

Section titled “Display: Expected Formula (DisplayExpectedFormula__c)”

Optional Long Text Area(32,768) for Formula Checks. It supplies the Expected value shown on the card and never changes pass or fail. Leave it blank to show the generated Passes when… text based on Pass Condition.

Examples:

FormulaDetected result typeDisplayed value
"Complete"TextComplete
BillingCountryTextThe current Billing Country
Parent.BillingCountryTextThe parent Account’s Billing Country
"City, State, and Country populated"TextA readable target statement
10Number10
AnnualRevenue / 10NumberTen percent of Annual Revenue
DATE(YEAR(TODAY()), 12, 31)DateThe final day of the current year
NOW() + 7Date/TimeSeven days from the current time
TRUECheckboxtrue

Formula Result Type (FormulaResultType__c)

Section titled “Formula Result Type (FormulaResultType__c)”

Restricted picklist with an Automatic default. It declares the return type only when a Query Check calculates a comparison operand from Expected Value (Formula) or Value to find in the list (formula). An explicit type evaluates that operand once; Automatic can probe the supported types.

Setup choiceStored value
AutomaticAUTO (default)
CheckboxBOOLEAN
NumberNUMBER
DateDATE
Date/TimeDATETIME
TextTEXT

It does not apply to Pass Condition or Applicability formulas, which must return Checkbox, or to Display: Found and Display: Expected formulas, which detect their own result type. For a Formula, Compare Two Queries, or Apex Check, leave the portable default Automatic. For a Query Check, leave Automatic unless an administrator has verified the exact result type of every configured comparison-operand formula that uses this shared setting.

5. Query sources (QUERY / COMPARE_TWO_QUERIES)

Section titled “5. Query sources (QUERY / COMPARE_TWO_QUERIES)”

Long Text Area(32,768). This is normally the first SOQL query for Verify with a query and Compare two queries. Use COUNT() when the business question asks “how many?” and use record merge tokens to filter for the current record.

Leave Source Query blank only for a one-query List contains any or List contains none Check. That pattern takes the value to search for from Value to find in the list (formula) and the list from Comparison Query.

Examples:

SELECT COUNT() FROM Contact WHERE AccountId = {!record.Id}
SELECT SUM(Amount) totalAmount FROM Opportunity WHERE AccountId = {!record.Id} AND IsClosed = false

Optional Text(255). Enter the field API name or aggregate alias whose value Record Health Check must read from Source Query. For example, enter MailingCity for SELECT MailingCity ..., or totalAmount for the aliased SUM(Amount) query below.

Leave this field blank only when Source Query uses bare COUNT(). Give SUM(), MIN(), MAX(), AVG(), COUNT(field), and COUNT_DISTINCT(field) an alias and enter that alias here.

Example: use totalAmount for the aliased aggregate below. Leave this field blank for bare COUNT().

SELECT SUM(Amount) totalAmount FROM Opportunity WHERE AccountId = {!record.Id}

Long Text Area(32,768). This is the second SOQL query when:

  • Evaluation Type is Compare two queries;
  • Expected Value Comes From is Comparison query; or
  • a one-query Check uses List contains any or List contains none.

Use Comparison Query Field to identify the selected field or aggregate alias to read.

Examples:

SELECT COUNT() FROM Opportunity WHERE AccountId = {!record.Id} AND IsClosed = false
SELECT AnnualRevenue FROM Account WHERE Id = {!record.ParentId fallback="001000000000000AAA"}
SELECT EndDate FROM Contract WHERE AccountId = {!record.Id} AND Status = 'Activated' ORDER BY EndDate LIMIT 1
SELECT MailingState FROM Contact WHERE AccountId = {!record.Id} AND MailingState != null

Comparison Query Field (ComparisonQueryField__c)

Section titled “Comparison Query Field (ComparisonQueryField__c)”

Optional Text(255). It follows the same rule as Source Query Field: enter the selected field API name or aggregate alias, and leave it blank only for bare COUNT().

Example: use comparisonTotal for the aliased aggregate below.

SELECT SUM(Amount) comparisonTotal FROM Opportunity WHERE AccountId = {!record.Id} AND IsClosed = false

Value to find in the list (formula) (FindInListFormula__c)

Section titled “Value to find in the list (formula) (FindInListFormula__c)”

Long Text Area(32,768), required only for a Verify with a query Check using List contains any or List contains none. Enter a Salesforce formula that returns the one value to search for. The Comparison Query returns the list.

For example, enter BillingCity to look for the Account’s Billing City, or "Chicago" to look for fixed text. Also set How To Read Query Results to Compare as lists. Leave this field blank for all other operators.

Comparison Operator (ComparisonOperator__c)

Section titled “Comparison Operator (ComparisonOperator__c)”

Required restricted picklist with no default for Query and Compare two queries Checks.

Setup choiceStored valueUsed with
EqualsEQUALSOne value or aggregate
Does not equalNOT_EQUALSOne value or aggregate
Greater thanGREATER_THANOne value or aggregate
Greater than or equalGREATER_THAN_OR_EQUALOne value or aggregate
Less thanLESS_THANOne value or aggregate
Less than or equalLESS_THAN_OR_EQUALOne value or aggregate
Contains textCONTAINSText value
Does not contain textDOES_NOT_CONTAINText value
Is emptyIS_BLANKNo Expected value needed
Is not emptyIS_NOT_BLANKNo Expected value needed
List contains anyLIST_CONTAINS_ANYOne-query list search
List contains noneLIST_CONTAINS_NONEOne-query list search
Lists overlapLISTS_OVERLAPCompare two query result lists
Lists contain allLISTS_CONTAIN_ALLCompare two query result lists
Lists match exactlyLISTS_MATCH_EXACTLYCompare two query result lists

Every list operator requires How To Read Query Results = Compare as lists.

Expected Value Comes From (ExpectedValueSource__c)

Section titled “Expected Value Comes From (ExpectedValueSource__c)”

Use this restricted picklist for a Verify with a query Check when its operator needs an Expected value. There is no default.

Setup choiceStored valueComplete this field
Fixed valueFIXED_VALUEExpected Value (Fixed)
Record formulaRECORD_FORMULAExpected Value (Formula)
Comparison queryCOMPARISON_QUERYComparison Query and, when needed, Comparison Query Field

Leave it blank for Is empty, Is not empty, and Compare two queries.

Expected Value (Fixed) (ExpectedFixedValue__c)

Section titled “Expected Value (Fixed) (ExpectedFixedValue__c)”

Text(255), required when Expected Value Comes From is Fixed value. Enter a plain value with no formula syntax or quotation marks: Approved, 5, or 2025-01-31.

Expected Currency ISO Code (ExpectedCurrencyIsoCode__c)

Section titled “Expected Currency ISO Code (ExpectedCurrencyIsoCode__c)”

Optional Text(3), except that it is required in a multi-currency org when a Query Check compares a Currency field with a fixed value. Enter the fixed value’s ISO unit, such as USD or EUR. This declaration lets Record Health Check refuse a cross-unit comparison; it never converts a value. Leave it blank in single-currency orgs, for non-Currency fields, and for expected values that do not come from Fixed value.

Expected Value (Formula) (ExpectedRecordFormula__c)

Section titled “Expected Value (Formula) (ExpectedRecordFormula__c)”

Long Text Area(32,768), required when Expected Value Comes From is Record formula. Enter a Salesforce formula evaluated on the current record. It can return fixed text, a field, relationship field, or calculated value. Do not enter Apex or SOQL.

Examples:

FormulaFormula Result TypeValue used for comparison
"Approved"TextThe literal text Approved
BillingCityTextThe current record’s Billing City
Parent.BillingCityTextThe parent Account’s Billing City
5NumberThe number 5
BLANKVALUE(Parent.AnnualRevenue, 0)NumberThe parent Account’s Annual Revenue, with blank shown as 0
DATE(YEAR(TODAY()), 12, 31)DateThe final day of the current year
NOW() + 7Date/TimeSeven days from the current time
TRUECheckboxtrue

How To Read Query Results (QueryResultHandling__c)

Section titled “How To Read Query Results (QueryResultHandling__c)”

Required restricted picklist for Query and Compare two queries Checks.

Setup choiceStored valueMeaning
One row or aggregateONE_RESULTRead one row, COUNT(), SUM(), or another aggregate. This is the default.
Any record passesANY_ROW_PASSESThe Check passes when at least one returned record matches.
Every record passesALL_ROWS_PASSThe Check passes only when every returned record matches.
Compare as listsCOMPARE_AS_LISTSTreat query results as lists. Required for every list operator.

If Query Finds No Records (NoRowsResult__c)

Section titled “If Query Finds No Records (NoRowsResult__c)”

Required with Any record passes, Every record passes, and Compare as lists. There is no default because no records can have different business meanings.

Setup choiceStored valueUse it when no records means…
PassPASSThe requirement is satisfied. For example, no open high-priority Cases is healthy.
FailFAILA required related record is missing.
SkipSKIPThe Check does not apply.
Unable to evaluateUNABLE_TO_EVALUATEThe available data cannot answer the question.

If Field Value Is Empty (EmptyValueHandling__c)

Section titled “If Field Value Is Empty (EmptyValueHandling__c)”

Optional restricted picklist for non-aggregate Query and Compare two queries Checks.

Setup choiceStored valueBehavior
Ignore the recordSKIP_RECORDLeave that returned record out of the comparison.
Treat as blankAS_BLANKCompare the value as blank text.
Treat as not matchingAS_NO_MATCHThe empty value does not match. This is the default.

Formula Checks, Apex Checks, and aggregate queries ignore this field.

Optional Number(4,0) from 1 through 2000; default 200. It limits rows returned by this Check’s Query or Compare two queries SOQL.

Keep it as low as the business question allows because each row uses Salesforce query rows, memory, and processing time in the current transaction. Narrow the SOQL before increasing this number. If more than 200 rows are genuinely required, test the real Check and realistic records in a sandbox.

Optional Text(255) that replaces the Found line for Formula, Query, and Compare two queries Checks. It changes only the displayed text, not the result. For an Every record passes query, it replaces the generated “N of M records did not pass” summary.

Merge tokens are supported, including {!rhcResult.foundValue} for the original value. Apex Checks return their own Found value, so this field is ignored for Apex and validation reports APEX_DISPLAY_TEXT_IGNORED.

Examples:

{!rhcResult.failedRecordCount} of {!rhcResult.totalRecordCount} contacts for {!record.Name} are missing email.

Display: Expected Text (DisplayExpectedText__c)

Section titled “Display: Expected Text (DisplayExpectedText__c)”

Optional Text(255) that replaces the Expected line for Formula, Query, and Compare two queries Checks. It changes only the displayed text. On a Formula Check, it replaces the generated Passes when text.

Merge tokens are supported, including {!rhcResult.expectedValue} for the original value. Apex Checks return their own Expected value, so this field is ignored for Apex and validation reports APEX_DISPLAY_TEXT_IGNORED.

Examples (choose one that fits the Check):

Expected {!rhcResult.expectedValue} for every contact related to {!record.Name}.
All {!rhcResult.totalRecordCount} contacts should have an email address.

Optional restricted picklist. It decides whether the Check applies before Record Health Check runs its pass/fail logic. When the condition is not met, the result is SKIPPED, not FAIL.

Setup choiceStored valueConfigure next
All recordsALL_RECORDSNothing; this is the default.
When a formula is trueWHEN_FORMULA_TRUEApplies When (Formula)
When a count query matchesWHEN_COUNT_QUERY_MATCHESApplies When (Count Query), Count Must Be, and Count Value

Message When Not Applicable (ApplicabilityNotMetMessage__c)

Section titled “Message When Not Applicable (ApplicabilityNotMetMessage__c)”

Optional Long Text Area(32,768). Explain why a conditional Check was skipped. It supports merge tokens.

Examples:

{!record.Name} is a {!record.Type} account; this requirement applies only to channel partners.
This Check applies only to channel-partner Accounts.

Applies When (Formula) (ApplicabilityFormula__c)

Section titled “Applies When (Formula) (ApplicabilityFormula__c)”

Long Text Area(32,768), required when Applies To is When a formula is true. Enter a Salesforce formula evaluated on the current record. true runs the Check; false produces SKIPPED. Example: ISPICKVAL(Type, "Customer").

Applies When (Count Query) (ApplicabilityCountQuery__c)

Section titled “Applies When (Count Query) (ApplicabilityCountQuery__c)”

Long Text Area(32,768), required when Applies To is When a count query matches. Enter a COUNT() SOQL query. Record Health Check compares the returned count with Count Must Be and Count Value. A matching count runs the Check; a nonmatching count produces SKIPPED.

This query decides only whether the Check applies. It does not decide pass or fail.

Examples:

SELECT COUNT() FROM Opportunity WHERE AccountId = {!record.Id} AND IsClosed = false

Count Must Be (ApplicabilityCountOperator__c)

Section titled “Count Must Be (ApplicabilityCountOperator__c)”

Required restricted picklist when Applies To is When a count query matches.

Setup choiceStored value
Equal toEQUALS
Not equal toNOT_EQUALS
Greater thanGREATER_THAN
At leastGREATER_THAN_OR_EQUAL
Less thanLESS_THAN
At mostLESS_THAN_OR_EQUAL

Count Value (ApplicabilityCountThreshold__c)

Section titled “Count Value (ApplicabilityCountThreshold__c)”

Number(4,0), required when Applies To is When a count query matches. This is the number used with Count Must Be. For example, Greater than and 0 runs the Check only when the query finds at least one record.

Optional Text(255). Enter the Developer Name shown in Setup, not the Check Title, of another active Check in the same Check Set. That Check must return PASS before this Check can run. It may have an earlier or later Evaluation Order; dependency scheduling runs it first.

During a complete Check Set run, any prerequisite result other than PASS makes this Check SKIPPED. A missing, inactive, misspelled, or omitted prerequisite is also skipped with the Check Set dependency result; run Check Set validation to find the configuration error.

A single-Check request evaluates only the selected Check. Lightning single-Check, Flow Run Record Health Check, Agent, and Apex RecordHealthCheckRequest.forCheck(...) calls therefore do not load or enforce this dependency. Use a Check Set request whenever prerequisite ordering is required. Example: Account_Phone_Is_Present.

Text(255), required for Verify with Apex. Enter the API name of an Apex class that implements rhc.RecordHealthCheckPlugin.

For example, AccountHasRecentActivityCheck is included with the installed Record Health Check package. A class created by your development team might be named MyAccountApprovalCheck. See the Apex Check examples for the complete class contract and tests.

Apex Parameters (JSON) (ApexParametersJson__c)

Section titled “Apex Parameters (JSON) (ApexParametersJson__c)”

Optional Long Text Area(32,768) for Apex Checks. Enter valid JSON required by the class, such as {"daysBack": 90} for AccountHasRecentActivityCheck. Leave it blank when the class has no parameters.

The values belong only to this Check. Invalid JSON produces UNABLE_TO_EVALUATE with reason code INVALID_APEX_PARAMETERS.

Publish User Result Event (PublishUserResultEvent__c)

Section titled “Publish User Result Event (PublishUserResultEvent__c)”

Checkbox, cleared by default. It applies only when a person clicks Run or Rerun on the Lightning card.

Select this field only when a Platform Event-triggered Flow, Apex trigger, or integration must receive this individual Check result after a person clicks Run or Rerun on the Lightning card. An automatic page-load check does not publish it.

This checkbox does not control Flow, Apex, Batch, Queueable, Future, Scheduled Apex, or agent runs. Those callers choose NONE, ACTIONABLE, or ALL when they start the health check. For example, ALL publishes every result even when this checkbox is cleared.

Leave it cleared when nothing receives the event. Select it only for the individual Checks the receiving automation uses; publishing one event per Check can create considerably more Platform Events than publishing one Check Set summary. See Choose whether to publish result events.