Salesforce resources

Salesforce documentation example with source evidence

Follow a validation rule from its formula to a plain-language explanation and verification cases. An ungated, synthetic worked example.

A teaching example, not a customer case study

This example was authored to demonstrate a documentation method. It is neither a product export generated from a real org nor an executed test result. The synthetic object is Opportunity and the rule is named Closed_Won_Requires_Amount.

What the formula supports

The formula raises an error when the stage is Closed Won and the amount is blank or less than or equal to zero. The rule references StageName and Amount. Its business rationale still needs confirmation from the process owner.

This formula cannot establish the other rules in the org, a user’s effective access or the absence of automation that changes these fields.

What still needs to be documented

  • The deployed version and observation date.
  • Automation that sets StageName or Amount within the reviewed scope.
  • Other applicable rules and exemptions, if any.
  • Test results actually executed in an authorised environment.
  • The business owner and confirmed reason for the rule.

Source and expected checks

Synthetic validation-rule formula:

AND(
  ISPICKVAL(StageName, "Closed Won"),
  OR(ISBLANK(Amount), Amount <= 0)
)
Expected isolated formula outcomes — no Salesforce tests executed
StageNameAmountExpected error
Closed Won100No
Closed Won0Yes
Closed Won-1Yes
Closed WonblankYes
Prospecting0No

These cases exclude all other automation and rules. They prepare verification; they do not establish an org’s compliance.

Download the synthetic source file

References and scope

An aprity teaching example. The Salesforce reference describes ValidationRule; it does not validate this example in your org.

Practical Salesforce documentation resources

A method, a reusable template and a worked example. No signup required.

Apply the method to your own org

Explore aprity and evaluate the results against a scope your team knows.