Soru

Zorluk: OrtaValidation Rules and Data Quality Enforcement

A Salesforce Administrator needs to enforce data quality standards on the Account object. Business policy requires that an error message be displayed to prevent saving an Account record under either of the following independent conditions:
1. The Account Type picklist is set to 'Partner' and the custom field Tax_ID__c is left blank.
2. The Account Rating picklist is set to 'Hot' and the AnnualRevenue numeric field is either blank or less than or equal to zero.

Which validation rule formula expressions will successfully evaluate to TRUE to enforce these data quality requirements? (Select TWO answers)

  1. AND(ISPICKVAL(Type, "Partner"), ISBLANK(Tax_ID__c))Cevap
  2. AND(ISPICKVAL(Rating, "Hot"), OR(ISBLANK(AnnualRevenue), AnnualRevenue <= 0))Cevap
  3. C
    AND(ISPICKVAL(Rating, "Hot"), AnnualRevenue <= 0)
  4. D
    AND(ISPICKVAL(Type, "Partner"), ISBLANK(Lead.Tax_ID__c))
  5. E
    AND(RecordType.Name = "Partner", ISBLANK(Tax_ID__c))

Cevap

The validation rules must evaluate to TRUE when data quality criteria are violated. The expression checking the Type picklist and the blank Tax_ID__c field using ISPICKVAL and ISBLANK, along with the expression checking the Rating picklist while incorporating ISBLANK and numeric comparison for AnnualRevenue, are the two correct formula expressions.
Validation rules trigger an error when the formula evaluates to TRUE. The formula combining ISPICKVAL(Type, "Partner") with ISBLANK(Tax_ID__c) correctly identifies when a Partner account is saved without a tax ID. The formula combining ISPICKVAL(Rating, "Hot") with OR(ISBLANK(AnnualRevenue), AnnualRevenue <= 0) correctly handles both blank and non-positive numerical values.

Adım Adım Çözüm

1
Analyze Condition 1 for the Account Type picklist and custom Tax_ID__c field.
The Type field is a picklist, requiring ISPICKVAL(Type, "Partner"). The Tax_ID__c field requires ISBLANK(Tax_ID__c). Combining them with AND() returns TRUE when both criteria are met.
Validation rules fire when the expression evaluates to TRUE.
2
Analyze Condition 2 for the Rating picklist and numeric AnnualRevenue field.
The Rating check requires ISPICKVAL(Rating, "Hot"). The revenue requirement must account for both null values and non-positive numbers: OR(ISBLANK(AnnualRevenue), AnnualRevenue <= 0).
Proper null handling ensures that unpopulated numerical fields trigger the validation rule properly alongside values <= 0.

Anahtar Kavram

Salesforce Validation Rule Formula Writing and Null Value Handling
Bu soruyu puanla