Field and completed-text limits
Find the length and type limit of every Record Health Check Set and Check field, and the separate
limit on text after merge tokens are filled in. Use it when Salesforce rejects a value, a Check
returns RESOLVED_TEMPLATE_TOO_LONG, or a failed Check does not show its action link.
Two limits can apply. The Salesforce field limit controls what an administrator can save in Custom Metadata. The completed-text limit applies later, after Record Health Check replaces merge tokens such as {!record.Name} with Salesforce values. Most fields have only the Salesforce limit.
Start with what happened
Section titled “Start with what happened”| What you observe | Which limit matters | What to do |
|---|---|---|
| Salesforce will not save or deploy the Custom Metadata value | What Salesforce accepts | Find the field below and shorten or correct the value so it matches the Salesforce field type and limit. |
A Check returns UNABLE_ with RESOLVED_ | Completed text limit | Shorten the configured text or the Salesforce values inserted by its merge tokens. |
| A failed Check does not show its configured action link | The Action URL limit and URL checks | The failure still appears. Keep the final URL within 2,000 characters and use a same-org relative URL or an https:// URL. |
Why completed text has a separate limit
Section titled “Why completed text has a separate limit”Some fields contain a message template rather than the final words a user sees. Record Health Check creates the completed text by replacing merge tokens with Salesforce data. For example, {!record.Name} is replaced with the current record’s Name. Add a quoted fallback when an empty value needs a substitute, as in {!record.Name fallback="Unnamed record"}.
A saved template can therefore be short while the completed text becomes much larger. FailureMessage__c might contain Account {!record.Name} needs review., but the Account Name is not inserted until the Check runs.
Record Health Check limits one completed value to 20,000 characters. This prevents an inserted Salesforce value from creating an unexpectedly large Apex or Flow response and keeps the Lightning card from receiving more display text than intended.
When completed text crosses the limit, Record Health Check returns UNABLE_TO_EVALUATE with RESOLVED_TEMPLATE_TOO_LONG. It does not cut the message because partial instructions could mislead the user. Not applicable means Record Health Check does not build completed text from the field, so only the Salesforce limit matters. Most of these fields accept no merge tokens. The three query fields (Source Query, Comparison Query, and Applies When (Count Query)) accept {!record.…} tokens but pass each value to Salesforce as a query value instead of inserting it as text.
One display template can contain at most 100 merge tokens, and one completed value can contain at most 20,000 characters. Record Health Check returns UNABLE_TO_EVALUATE instead of silently shortening text. A completed Action URL must also start with / or https://, contain no line breaks, tabs, or backslashes, and contain no more than 2,000 characters.
Record name limits
Section titled “Record name limits”Every Check Set and Check record also has the two standard Custom Metadata name fields. Neither accepts merge tokens.
| Setup label | Field API name | What Salesforce accepts | If the value is too long or invalid |
|---|---|---|---|
| Label | MasterLabel | Up to 40 characters | Salesforce will not save the record. Shorten it; the card shows Card Title or Check Title, not the Label |
| Record Health Check Set Name or Record Health Check Name | DeveloperName | Up to 40 characters: letters, numbers, and single underscores, starting with a letter and not ending with an underscore | Salesforce will not save the record. Flow, Apex, and other Checks refer to the record by this name, so choose it before you reference it |
Check Set text limits
Section titled “Check Set text limits”No Check Set field accepts merge tokens, so each text field has only its Salesforce limit. Select an API name for its Setup label, purpose, default, and examples.
| Field API name | Salesforce field type | What Salesforce accepts | Completed text limit | If the value is too long |
|---|---|---|---|---|
CardSubtitle_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
CardTitle_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
ObjectApiName_ | Text | 80 | Not applicable | Record Health Check uses the saved value as-is |
RerunButtonLabel_ | Text | 80 | Not applicable | Record Health Check uses the saved value as-is |
RunButtonIcon_ | Text | 80 | Not applicable | Record Health Check uses the saved value as-is |
RunButtonLabel_ | Text | 80 | Not applicable | Record Health Check uses the saved value as-is |
Check text limits
Section titled “Check text limits”These Check fields can be affected by a saved-value or completed-text character limit. Select an API name to learn which Evaluation Type uses it and how it affects the result.
| Field API name | Salesforce field type | What Salesforce accepts | Completed text limit | If the value is too long |
|---|---|---|---|---|
ActionLabel_ | Text | 80 | 20,000 | Record Health Check returns UNABLE_ with RESOLVED_; it does not shorten the text |
ActionUrl_ | LongTextArea | 32,768 | 2,000 | Record Health Check leaves out a URL over 2,000 characters or one that fails its safety checks |
ApexClass_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
ApexParametersJson_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
ApplicabilityCountQuery_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
ApplicabilityFormula_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
ApplicabilityNotMetMessage_ | LongTextArea | 32,768 | 20,000 | Record Health Check returns UNABLE_ with RESOLVED_; it does not shorten the text |
CheckDescription_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
CheckTitle_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
ComparisonQueryField_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
ComparisonQuery_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
DisplayExpectedFormula_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
DisplayExpectedText_ | Text | 255 | 20,000 | Record Health Check returns UNABLE_ with RESOLVED_; it does not shorten the text |
DisplayFoundFormula_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
DisplayFoundText_ | Text | 255 | 20,000 | Record Health Check returns UNABLE_ with RESOLVED_; it does not shorten the text |
ExpectedCurrencyIsoCode_ | Text | 3 | Not applicable | Record Health Check uses the saved value as-is |
ExpectedFixedValue_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
ExpectedRecordFormula_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
FailureMessage_ | LongTextArea | 32,768 | 20,000 | Record Health Check returns UNABLE_ with RESOLVED_; it does not shorten the text |
FindInListFormula_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
FixMessage_ | LongTextArea | 32,768 | 20,000 | Record Health Check returns UNABLE_ with RESOLVED_; it does not shorten the text |
PassConditionFormula_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
PrerequisiteCheck_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
SourceQueryField_ | Text | 255 | Not applicable | Record Health Check uses the saved value as-is |
SourceQuery_ | LongTextArea | 32,768 | Not applicable | Record Health Check uses the saved value as-is |
UnableToEvaluateMessage_ | LongTextArea | 32,768 | 20,000 | Record Health Check returns UNABLE_ with RESOLVED_; it does not shorten the text |
Fields controlled by something other than character count
Section titled “Fields controlled by something other than character count”These fields are still constrained, but making their text shorter will not solve the problem. Picklists accept only shipped API values, checkboxes accept true or false, Number fields enforce their digit count, and the relationship must name a Check Set.
| Metadata type | Salesforce field type | Constraint | Field API names |
|---|---|---|---|
| Check Set | Picklist | Restricted value set | CardHeadingDisplay_, CardRevealMode_, CardRunMode_, FoundExpectedDisplay_, PassedChecksDisplay_, RunButtonDisplay_, SkippedChecksDisplay_, SummaryDisplay_ |
| Check Set | Checkbox | true/false | IsActive_, PublishErrorLogEvent_, PublishUserRunEvent_, ShowDiagnostics_, StopOnSystemError_ |
| Check | Picklist | Restricted value set | ApplicabilityCountOperator_, ApplicabilityMode_, Category_, ComparisonDisplayMode_, ComparisonOperator_, DisplayValueFormat_, EmptyValueHandling_, EvaluationType_, ExpectedValueSource_, FailureSeverity_, FormulaResultType_, NoRowsResult_, QueryResultHandling_ |
| Check | Number | 4 digits, 0 decimal places | ApplicabilityCountThreshold_, EvaluationOrder_, MaxQueryRows_ |
| Check | Checkbox | true/false | IsActive_, PublishUserResultEvent_ |
| Check | Metadata relationship | Must name a Check Set | Record_ |
This page covers all 19 Check Set fields and 45 Check fields in the shipped Custom Metadata definitions, plus the two standard name fields on each record.
If the limit is exceeded
Section titled “If the limit is exceeded”Salesforce rejects a value that does not fit its Custom Metadata field. Record Health Check never receives that value. Shorten or correct it, then save or deploy again.
When inserted values make display text longer than 20,000 characters, the Check returns UNABLE_TO_EVALUATE with RESOLVED_TEMPLATE_TOO_LONG. Shorten the configured message or review the Salesforce fields used by its merge tokens. Record Health Check does not cut off the message because partial guidance could mislead the user.
When an Action URL is unsafe or longer than 2,000 characters, the Check can still return FAIL and show its Fix Message, but Record Health Check leaves out the link. An authorized administrator can use Show Diagnostics to investigate the completed URL.