Question

Difficulty: HardValidation Rules and Data Quality Enforcement

An administrator needs to write a validation rule on the Account object. The business requirement states that whenever an existing Account record is updated and its Rating picklist is set to 'Hot', the AnnualRevenue field must be populated with a value greater than 00. If AnnualRevenue is left blank, the validation rule must trigger to prevent saving. Which formula criteria correctly enforces this logic while properly handling blank values?

  1. AND( NOT(ISNEW()), ISPICKVAL(Rating, "Hot"), OR(ISBLANK(AnnualRevenue), AnnualRevenue <= 0) )Answer
  2. B
    AND( NOT(ISNEW()), ISPICKVAL(Rating, "Hot"), AnnualRevenue <= 0 )
  3. C
    AND( ISNEW(), TEXT(Rating) = "Hot", AnnualRevenue <= 0 )
  4. D
    AND( NOT(ISNEW()), RecordType.Name = "Hot", ISBLANK(AnnualRevenue) )

Answer

The correct formula uses AND( NOT(ISNEW()), ISPICKVAL(Rating, "Hot"), OR(ISBLANK(AnnualRevenue), AnnualRevenue <= 0) ) to ensure that updates to existing records evaluate the Rating picklist and explicitly verify both blank state and numerical values for AnnualRevenue.
The formula stating 'AND( NOT(ISNEW()), ISPICKVAL(Rating, "Hot"), OR(ISBLANK(AnnualRevenue), AnnualRevenue <= 0) )' correctly enforces all business constraints: it filters out record creation via NOT(ISNEW()), verifies picklist status with ISPICKVAL(), and robustly catches both null/blank entries and values less than or equal to 0.

Step-by-Step Solution

1
Identify record lifecycle state requirement
Use NOT(ISNEW()) to ensure the rule triggers only during record updates, excluding record creation.
The requirement specifies that the validation rule applies when an existing Account record is updated.
2
Evaluate picklist field condition
Use ISPICKVAL(Rating, "Hot") to check if the Rating picklist field contains 'Hot'.
Validation rules require ISPICKVAL() or TEXT() functions to evaluate picklist values.
3
Construct proper null and value comparison logic
Combine ISBLANK(AnnualRevenue) with AnnualRevenue <= 0 inside an OR() statement.
Numerical comparisons alone do not reliably capture blank or null values; explicit ISBLANK checks prevent formula evaluation errors and bypasses.

Key Concept

Handling null values explicitly in validation rule formulas evaluating picklists and numeric fields
Rate this question