Soru

Zorluk: OrtaValidation Rules and Data Quality Enforcement

An administrator needs to enforce a data quality requirement on the Case object. Whenever a Case record status is set to 'Closed', the Resolution_Notes__c custom text field must not be left blank. Which validation rule formula correctly enforces this requirement?

  1. AND(ISPICKVAL(Status, "Closed"), ISBLANK(Resolution_Notes__c))Cevap
  2. B
    AND(ISPICKVAL(Status, "Closed"), NOT(ISBLANK(Resolution_Notes__c)))
  3. C
    AND(RecordType.Name = "Closed", ISBLANK(Resolution_Notes__c))
  4. D
    AND(ISPICKVAL(Status, "Closed"), ISBLANK(Lead.Resolution_Notes__c))

Cevap

The correct validation formula is AND(ISPICKVAL(Status, "Closed"), ISBLANK(Resolution_Notes__c)).
The correct expression combines ISPICKVAL for evaluating the picklist field 'Status' with ISBLANK for checking whether 'Resolution_Notes__c' contains data. When both conditions are met, the formula evaluates to TRUE, triggering the validation error as intended.

Adım Adım Çözüm

1
Identify the status condition required for validation.
Since Status is a picklist field, evaluating whether it equals 'Closed' requires using the ISPICKVAL function: ISPICKVAL(Status, "Closed").
Standard equality operators do not work directly on picklist fields in validation formulas without TEXT() or ISPICKVAL().
2
Identify the data quality check for the text field.
Checking if Resolution_Notes__c is missing a value requires the ISBLANK function: ISBLANK(Resolution_Notes__c).
ISBLANK accurately handles missing or NULL text data in Salesforce formula fields.
3
Combine both conditions into an AND statement.
AND(ISPICKVAL(Status, "Closed"), ISBLANK(Resolution_Notes__c)).
Validation rules trigger an error when the formula expression evaluates to TRUE. The combined formula fires an error only when the status is Closed AND the notes field is blank.

Anahtar Kavram

Validation Rule Logic and Null Evaluation using ISPICKVAL and ISBLANK
Bu soruyu puanla