Soru

Zorluk: KolayValidation Rules and Data Quality Enforcement

An administrator needs to ensure that whenever an Opportunity stage is set to 'Closed Won', the custom field 'Payment_Method__c' must not be left blank. Which validation rule formula correctly enforces this requirement?

  1. AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Payment_Method__c))Cevap
  2. B
    AND(ISPICKVAL(StageName, "Closed Won"), Payment_Method__c = "")
  3. C
    OR(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Payment_Method__c))
  4. D
    AND(NOT(ISPICKVAL(StageName, "Closed Won")), ISBLANK(Payment_Method__c))

Cevap

The validation rule formula using AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Payment_Method__c)) correctly enforces the data quality requirement.
Validation rules prevent saving a record when the formula returns TRUE. Combining ISPICKVAL(StageName, 'Closed Won') with ISBLANK(Payment_Method__c) inside an AND() function ensures that if the Opportunity is marked as 'Closed Won' and the payment method is missing, the validation rule triggers and displays the error message.

Adım Adım Çözüm

1
Identify the required logic conditions for triggering the validation error
The validation rule must evaluate to TRUE when StageName is 'Closed Won' AND Payment_Method__c is blank.
Salesforce validation rules display an error message when the formula expression returns true.
2
Select the proper functions for picklist evaluation and null checking
Use ISPICKVAL() to evaluate picklist fields like StageName and ISBLANK() to evaluate whether Payment_Method__c contains a value.
Direct text comparison operators are restricted on picklists, and ISBLANK() is the standard function for checking null/blank values.
3
Combine conditions using the logical AND operator
AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Payment_Method__c))
Both conditions must simultaneously be met to trigger the validation error.

Anahtar Kavram

Validation Rule Logic and Null Checking with ISBLANK
Bu soruyu puanla