Soru

Zorluk: OrtaValidation Rules and Data Quality Enforcement

A Salesforce administrator at a renewable energy firm needs to enforce data quality on the Opportunity object. The business requirement dictates that whenever an Opportunity is set to the 'Closed Won' stage, the custom text field Project_Install_Address__c must not be left blank. Which validation rule formula correctly enforces this requirement?

  1. AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Project_Install_Address__c))Cevap
  2. B
    AND(ISPICKVAL(StageName, "Closed Won"), Project_Install_Address__c = "")
  3. C
    Configure Lead Conversion Field Mapping to map the Lead Address to the Opportunity Project_Install_Address__c field.
  4. D
    Remove the 'Closed Won' value from the Opportunity Record Type picklist assignment for users who leave the address empty.

Cevap

The validation rule formula using AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Project_Install_Address__c)) correctly evaluates to TRUE and blocks the record save whenever an Opportunity reaches 'Closed Won' status with an unpopulated installation address field.
The formula using AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Project_Install_Address__c)) is correct because validation rules block record creation/updates when the formula evaluates to TRUE. Combining ISPICKVAL for the StageName picklist with ISBLANK for the text field properly catches records moving to Closed Won without the required address.

Adım Adım Çözüm

1
Identify the field types and required condition criteria.
StageName is a picklist field requiring ISPICKVAL(), and Project_Install_Address__c is a text field requiring ISBLANK().
Salesforce formula syntax requires picklist values to be evaluated using specific functions rather than direct text comparison operator equality.
2
Combine the conditions into a single logical error expression.
Use the AND() function so both criteria must be met to trigger the validation error.
A validation rule triggers its error message when the overall formula evaluates to TRUE.

Anahtar Kavram

Salesforce Validation Rule Formulas and Null Field Handling
Bu soruyu puanla