Skip to content
Suggest a correction

Check the parent Account's headquarters city

Example4 min read

Create a Record Health Check that applies to Accounts with a parent Account and passes when the parent has a Billing City. When the city is missing, the card links straight to the parent Account’s edit page, because that is the record to fix. The example uses the Verify with a formula Evaluation Type with a parent relationship field.

A formula on an Account can read fields on its Parent Account through the Parent relationship, so one formula can check the headquarters city without a query or code. A Validation Rule on the branch Account would block a save on the wrong record; this Check guides the user to the parent.

  • Install Record Health Check, and assign yourself Record Health Check Admin and the Salesforce Customize Application permission.
  • Confirm that your org records headquarters on the Parent Account. If it uses another field or object, adapt the formula instead of copying it.
  • Confirm that the people who will use the card can read the parent Account and its Billing City, and can edit the parent if they are expected to fix it.

You can add the Check to an Account Check Set you already have. To create one, open Setup → Custom Metadata Types, select Manage Records next to Record Health Check Set, select New, enter these values, and save. Leave other fields at their defaults.

FieldValue
LabelAccount Data Quality
ObjectAccount
Record Health Check Set NameAccount_Data_Quality
ActiveCleared until validation succeeds
Card TitleAccount Data Quality
Card SubtitleConfirm the parent Account’s location before branch handoff.
When Checks RunWhen the user clicks Run

Open Setup → Custom Metadata Types, select Manage Records next to Record Health Check, select New, enter these values, and save.

FieldValue
LabelParent Account Has Billing City
Check SetAccount Data Quality
Evaluation TypeVerify with a formula
Record Health Check NameParent_Account_Has_Billing_City
Evaluation Order40
ActiveCleared until validation succeeds
Pass ConditionNOT(ISBLANK(Parent.BillingCity))
Check TitleParent Account has a Billing City
Check DescriptionApplies to Accounts with a parent. Passes when the parent Account has a Billing City.
Message When FailedThe parent Account of {!record.Name fallback="this Account"} has no Billing City.
Fix MessageOpen the parent Account, enter its Billing City, then run the Check again on this Account.
Message When Unable To EvaluateUnable to read the parent Account's Billing City. Confirm that you can see the parent Account.
Failure SeverityWarning
Action LabelEdit parent Account
Action URL/lightning/r/Account/{!record.ParentId}/edit
Applies ToWhen a formula is true
Applies When (Formula)NOT(ISBLANK(ParentId))
Message When Not Applicable{!record.Name fallback="This Account"} has no parent Account.

How the values work:

  • Parent.BillingCity reads Billing City on the Account in the Parent Account field.
  • Applies When (Formula) skips Accounts with no parent, so a top-level Account never fails.
  • {!record.ParentId} in Action URL inserts the parent Account’s ID, so the link opens the parent’s edit page. The link does not give the user access to the parent; Salesforce still applies the user’s permissions when the page opens.
  1. Run the Validate Record Health Check Configuration Flow action, as described in Validate configuration before activation, and correct every error.
  2. Activate the Check, then the Check Set.
  3. Add the Record Health Check component to the Account record page, select Account Data Quality (Account_Data_Quality), and activate the page.
  4. Assign Record Health Check Card User to the users who test the card.

Use a sandbox Account with a parent Account. Select Run on the child Account’s card for each case.

Parent AccountParent’s Billing CityResult on the child Account’s card
SetBlankWarning, with Edit parent Account
SetPopulatedPass
BlankNot applicableSkipped, with the not-applicable message

Select Edit parent Account during the first test and confirm that the parent’s edit page opens. Then run a failing case as a user who cannot see the parent Account; the row shows Unable to Check.

On a child Account whose parent has no Billing City, the row shows Warning, the message, the fix message, and an Edit parent Account link. Most users see no Found and Expected values, because the Check has no display formulas. Users directly assigned Record Health Check Admin or Record Health Check Diagnostics Viewer see Expected with the Pass Condition formula.

What you seeWhat to check
Every Account shows SkippedThe Account’s Parent Account field is set.
Unable to CheckThe user can see the parent Account and read its Billing City.
Edit parent Account opens an errorThe user has edit access to the parent Account.