Question

Difficulty: MediumValidation Rules and Data Quality Enforcement

A Salesforce administrator at a software publishing company is setting up a validation rule on the custom object Bug_Report__c. The business requirement mandates that whenever the picklist field Severity__c is set to "Critical", the text field Resolution_Plan__c must not be left blank before saving the record. Which formula should the administrator use to enforce this data quality requirement?

  1. AND(ISPICKVAL(Severity__c, "Critical"), ISBLANK(Resolution_Plan__c))Answer
  2. B
    AND(ISPICKVAL(Severity__c, "Critical"), Resolution_Plan__c = NULL)
  3. C
    AND(ISPICKVAL(Severity__c, "Critical"), NOT(ISCHANGED(Resolution_Plan__c)))
  4. D
    AND(RecordType.Name = "Critical", ISBLANK(Resolution_Plan__c))

Answer

AND(ISPICKVAL(Severity__c, "Critical"), ISBLANK(Resolution_Plan__c))
The correct formula uses ISPICKVAL() to evaluate the picklist field Severity__c against the target value 'Critical' and combines it with ISBLANK(Resolution_Plan__c) inside an AND() function. When both conditions are met (Severity is Critical and Resolution Plan is empty), the formula returns TRUE, preventing the record from being saved without a resolution plan.

Step-by-Step Solution

1
Identify the field types and required condition functions
Severity__c is a picklist field requiring ISPICKVAL(), and Resolution_Plan__c is a text field requiring ISBLANK() to check for missing input.
Salesforce formula syntax requires ISPICKVAL() to evaluate picklist values and ISBLANK() to accurately detect null or empty text values.
2
Combine the conditions into a single logical AND function
The validation rule formula AND(ISPICKVAL(Severity__c, "Critical"), ISBLANK(Resolution_Plan__c)) returns TRUE when Severity is Critical AND Resolution Plan is blank.
Validation rules display an error message when the formula expression evaluates to TRUE.

Key Concept

Validation Rule Logic and Picklist/Null Evaluation
Rate this question