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 . 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?
- AND( NOT(ISNEW()), ISPICKVAL(Rating, "Hot"), OR(ISBLANK(AnnualRevenue), AnnualRevenue <= 0) )Cevap
- BAND( NOT(ISNEW()), ISPICKVAL(Rating, "Hot"), AnnualRevenue <= 0 )
- CAND( ISNEW(), TEXT(Rating) = "Hot", AnnualRevenue <= 0 )
- DAND( NOT(ISNEW()), RecordType.Name = "Hot", ISBLANK(AnnualRevenue) )
Cevap
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.
Adım Adım Çözüm
Anahtar Kavram
Handling null values explicitly in validation rule formulas evaluating picklists and numeric fields