Skip to content

Add a fix link

Guide6 min read

Give users a direct path to fix a failed Record Health Check. A Check can show fix instructions and a link to the page where the user makes the change, such as the record’s edit page, a related list, a report, a Knowledge article, or an external playbook.

Three fields on a Check control this:

FieldWhat it doesLength
Fix Message (FixMessage__c)Tells the user what to do next.Long text
Action Label (ActionLabel__c)The link text. When blank, the link reads Fix this.80 characters
Action URL (ActionUrl__c)Where the link goes. The link appears only when this field has a safe value.Long text; 2,000 characters after merge tokens are filled in

They appear only when the Check’s result is Failed, Warning, or Info. Pass, Skipped, Unable to Check, and System Error rows never show them.

A link only navigates. Opening an edit or create page saves nothing; the user reviews the page and decides whether to save.

A clear Fix Message is often enough. Add an Action URL only when one destination takes the user straight to the fix. Do not link to a general home page, to a page that changes data as soon as it opens, or to a page you have not tested with the access users have.

  1. In Setup, open Custom Metadata Types, and select Manage Records next to Record Health Check.
  2. Select Edit next to the Check.
  3. Enter Fix Message in section 2. Explain the result to users.
  4. Enter Action Label and Action URL in section 4. Add a fix link (optional).
  5. Select Save.

Record Health Check fills in merge tokens first, then checks the finished URL. A URL that is not allowed is removed, and the row shows the Fix Message without a link.

URLAllowed
A path in the same org that starts with /, such as /lightning/r/Account/001.../viewYes
An external URL that starts with https://Yes
http://, javascript:, data:, or mailto: URLsNo
A URL that starts with //No
A URL that contains a backslash, tab, or line breakNo
A URL longer than 2,000 characters after merge tokens are filled inNo

If a link does not appear on a failed row, check the URL against this table. A user with diagnostic access can turn on Show Diagnostics on the Check Set to see why a link was removed; other users never see a removed URL.

Use merge tokens in the label, message, and URL

Section titled “Use merge tokens in the label, message, and URL”

Merge tokens insert values from the open record into the text. {!record.Name} inserts the record’s Name, and {!record.Parent.Name fallback="no parent account"} inserts the parent Account’s Name, or the fallback text when there is none or the user cannot read it. A record token can follow up to five relationships.

FieldTokens you can use
Fix MessageEvery token: record, rhcResult, rhcCheck, rhcSet, rhcRun, and rhcQuery. It can also contain inline links written as {!link label="..." href="..."}.
Action LabelEvery token, but no inline links.
Action URLEvery token except rhcResult, because a result value is display text, not a safe part of a URL. Each inserted value is URL-encoded.

Examples:

Action Label: Review {!record.Name fallback="this account"}
Fix Message: Found {!rhcResult.foundValue}; update the record so it matches {!rhcResult.expectedValue}.
Action URL: /lightning/r/Account/{!record.Id}/edit

When a token in the Action URL has no value, the link is removed unless the token has a fallback. /lightning/r/Account/{!record.ParentId}/view shows no link on an Account without a parent; the row still shows the Fix Message, and the Check’s result does not change. A token in Fix Message or Action Label with no value inserts nothing, so add a fallback where empty text would read badly.

A custom field works in a token when it exists in the org and the running user can read it. The merge syntax reference lists every token.

Replace each placeholder, such as 00Oxxxxxxxxxxxxxxx or Data_Quality_Playbook, with a value from your org.

DestinationAction URL
View the current Account/lightning/r/Account/{!record.Id}/view
Edit the current Account/lightning/r/Account/{!record.Id}/edit
The Account’s Contacts related list/lightning/r/Account/{!record.Id}/related/Contacts/view
A report filtered to the current record/lightning/r/Report/00Oxxxxxxxxxxxxxxx/view?fv0={!record.Id}
A Contact list view/lightning/o/Contact/list?filterName=Recent
A Knowledge article/lightning/r/Knowledge__kav/ka0xxxxxxxxxxxxxxx/view
A Lightning app page/lightning/n/Data_Quality_Playbook
An external playbookhttps://support.example.com/account-readiness?accountId={!record.Id}
Section titled “Create a related record with prefilled values”

A Lightning create URL can prefill fields with defaultFieldValues:

/lightning/o/Case/new?defaultFieldValues=AccountId={!record.Id},Subject=Review%20{!record.Name fallback="this record"},Origin=Web

The user still reviews and saves the new Case. Salesforce can require other fields, or reject a default value that is not valid for the user, so test the link as a user who will use it.

To create a Task related to the record, prefill Related To with WhatId:

/lightning/o/Task/new?defaultFieldValues=WhatId={!record.Id}

WhatId relates the Task to an Account, Opportunity, Case, or similar record. To relate it to a Contact or Lead, prefill Name with WhoId instead.

Some installed example Checks use /lightning/r/Task/new instead. Salesforce’s create pattern is /lightning/o/<object>/new, so use that form in your own Checks, and test any link you copy from an example.

Lightning report URLs pass filter values in order: fv0 sets the report’s first filter, fv1 the second, and so on.

/lightning/r/Report/00Oxxxxxxxxxxxxxxx/view?fv0={!record.Id}&fv1={!record.Parent.Name fallback="no parent account"}

This URL works when the report’s first filter expects the record ID and its second filter expects the parent Account’s Name. A report ID is different in every org. To find it, open the report and copy the 00O... value from the browser address.

To find a Knowledge article ID, open the published article and copy the ka0... value from the browser address. Article visibility can differ by language, channel, and user.

FieldValue
Action LabelView contacts to fix
Action URL/lightning/r/Account/{!record.Id}/related/Contacts/view
Fix MessageOpen the contacts for {!record.Name} and add the missing email addresses.
FieldValue
Action LabelView high-priority cases
Action URL/lightning/r/Report/00Oxxxxxxxxxxxxxxx/view?fv0={!record.Id}
Fix MessageReview the open high-priority cases for {!record.Name} before the next renewal conversation.
FieldValue
Action LabelOpen data quality playbook
Action URLhttps://example.com/data-quality-playbook
Fix MessageReview the playbook before changing ownership or tier fields for {!record.Name fallback="this account"}.
  • Fail the Check on a test record and confirm that the link appears with the expected label.
  • Open the link as a user with normal access and confirm the destination.
  • Confirm that opening the link changes no data.
  • Confirm that a report link uses a report ID from the same org.
  • Clear a field used in a merge token and confirm the fallback text reads well.
  • Confirm the Fix Message still makes sense if the link is removed.