Skip to content

Check whether open Opportunities have Next Steps

Setup reference: Query Check configuration

Create a Query Check that reviews every visible open Opportunity related to an Account. It passes only when each returned Opportunity has a Next Step and skips Accounts with no open Opportunities.

The values are on related Opportunity records, so Verify with a query is the simplest option. The Check gives pipeline guidance on the Account without forcing a Next Step during every Opportunity save.

  • Confirm Next Step under Setup → Object Manager → Opportunity → Fields & Relationships.
  • Decide whether every open stage needs a Next Step. Add stage filters if early deals are exempt.
  • Confirm that intended users can read Opportunity, Account, Is Closed, and Next Step.
  • Save new configuration inactive and validate it before activation.

Use the Account Related Record Review Check Set from the previous example, or create it from Setup → Custom Metadata Types → Record Health Check Set → Manage Records:

Salesforce fieldValue
LabelAccount Related Record Review
Record Health Check Set NameAccount_Related_Record_Review
ObjectAccount
Card TitleAccount Related Record Review
Card SubtitleConfirm related records are ready for pipeline review.
When Checks RunWhen the user clicks Run
Summary DisplayShow below checks
Found/Expected DisplayShow on demand
ActiveUnchecked until validation succeeds

Open Setup → Custom Metadata Types → Record Health Check → Manage Records, select New, and enter:

Salesforce fieldValue
LabelOpen Opportunities Have Next Steps
Record Health Check NameOpen_Opportunities_Have_Next_Steps
Check SetAccount Related Record Review
Check TitleOpen Opportunities are ready for review
Evaluation TypeVerify with a query
Source QuerySELECT NextStep FROM Opportunity WHERE AccountId = {!record.Id} AND IsClosed = false
Source Query FieldNextStep
How To Read Query ResultsEvery record passes
Comparison OperatorIs not empty
If Query Finds No RecordsSkip
If Field Value Is EmptyTreat as not matching
Max Query Rows200
Failure SeverityWarning
Message When Failed{!record.Name fallback="This Account"} has one or more open Opportunities with no Next Step.
Message When Unable To EvaluateUnable to check open Opportunity Next Step. Confirm access to the queried fields.
Fix MessageEnter Next Step on every open Opportunity that still needs one.
Action LabelReview open opportunities
Action URL/lightning/r/Account/{!record.Id}/related/Opportunities/view
Evaluation Order40
ActiveUnchecked until validation succeeds

Every record passes evaluates each returned row. A blank Next Step is Treat as not matching, so one blank value fails the Check. No returned rows produce Skipped.

  1. Run the configuration-validation Flow.
  2. Correct every error and review every warning.
  3. Set the Check and Check Set to Active only after validation succeeds.
  4. Add Record Health Check to the Account Lightning record page and select the Check Set.
  5. Assign Record Health Check Card User to the people testing the card.
Visible open OpportunitiesNext Step valuesExpected result
NoneNot applicableSkipped
OnePopulatedPass
TwoBoth populatedPass
TwoOne blankWarning

Repeat the failing case as a user who can see only part of the pipeline. The result must follow the running user’s record sharing and field access; it cannot report hidden Opportunities.

The card reads the visible query result and compares it with the configured expected value.

Result detailMeaning
PASSThe query result satisfies the configured comparison.
FAILThe query result does not satisfy the comparison, and the card shows the configured guidance.
SKIPPEDThe Check does not apply or a configured prerequisite did not pass.
FoundThe normalized row, list, or aggregate value returned by the query.
ExpectedThe configured fixed value or evaluated expected formula.
What you seeCheck this first
A closed Opportunity is includedCopy the complete IsClosed = false filter
A blank Next Step passesConfirm Every record passes, Is not empty, and Treat as not matching
The Account skips unexpectedlyConfirm the user can see its open Opportunities
Unable to CheckConfirm object access, field access, and SOQL field names