Soru

Zorluk: OrtaValidation Rules and Data Quality Enforcement

A company uses a custom object named Support_Ticket__c to track customer issues. Management requires that whenever the Ticket_Status__c picklist field is set to 'Escalated', the Resolution_Plan__c text field must contain a value. To prevent legacy records from failing automated background updates, this rule should only enforce the requirement if the Ticket_Status__c field is actively modified or if a new record is being created.

Which validation rule formula correctly enforces this business requirement?

  1. AND(ISPICKVAL(Ticket_Status__c, "Escalated"), ISBLANK(Resolution_Plan__c), OR(ISNEW(), ISCHANGED(Ticket_Status__c)))Cevap
  2. B
    AND(Ticket_Status__c = "Escalated", Resolution_Plan__c = "", ISCHANGED(Ticket_Status__c))
  3. C
    AND(ISPICKVAL(Ticket_Status__c, "Escalated"), ISBLANK(Resolution_Plan__c), NOT(ISBLANK(Target_Lead_Field_Mapping__c)))
  4. D
    AND(ISPICKVAL(Ticket_Status__c, "Escalated"), ISBLANK(Resolution_Plan__c), RecordTypeId = "Escalated_Record_Type")

Cevap

The correct formula is AND(ISPICKVAL(Ticket_Status__c, "Escalated"), ISBLANK(Resolution_Plan__c), OR(ISNEW(), ISCHANGED(Ticket_Status__c))).
The correct answer combines ISPICKVAL() to evaluate the picklist value, ISBLANK() to check for missing text, and OR(ISNEW(), ISCHANGED(Ticket_Status__c)) to restrict rule firing to new records or records where the status was explicitly modified.

Adım Adım Çözüm

1
Evaluate picklist condition syntax
Use ISPICKVAL(Ticket_Status__c, "Escalated") to evaluate the picklist field value accurately.
Direct text comparison (=) on picklist fields in validation formulas results in syntax errors unless wrapped in TEXT() or using ISPICKVAL().
2
Evaluate null text field checking
Use ISBLANK(Resolution_Plan__c) to determine if the field is empty.
ISBLANK() handles both empty strings and null values safely across all field types.
3
Enforce record modification scope
Combine OR(ISNEW(), ISCHANGED(Ticket_Status__c)) within the AND condition.
This ensures that unchanged existing records updated via bulk processes will not fire validation unless Ticket_Status__c was specifically modified.

Anahtar Kavram

Validation Rule Logic with Picklist and Record Execution Scoping
Bu soruyu puanla