A Salesforce administrator needs to enforce data quality standards on the Opportunity object. Management requires that whenever an Opportunity stage is set to 'Closed Won', the custom text field Contract_Number__c must not be left empty. Which validation rule formula should the administrator implement to meet this requirement?
- AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Contract_Number__c))Cevap
- BAND(StageName = "Closed Won", Contract_Number__c = NULL)
- CAND(ISPICKVAL(LeadSource, "Closed Won"), ISBLANK(Contract_Number__c))
- DAND(ISPICKVAL(RecordType.Name, "Closed Won"), ISBLANK(Contract_Number__c))
Cevap
AND(ISPICKVAL(StageName, "Closed Won"), ISBLANK(Contract_Number__c))
The formula correctly uses ISPICKVAL to evaluate the picklist field StageName and ISBLANK to verify whether the custom text field Contract_Number__c contains no value. In Salesforce, validation rules trigger when the formula evaluates to true, so requiring a field to be populated when a picklist matches a specific value is expressed by combining the picklist match and the blank check within an AND statement.
Adım Adım Çözüm
Anahtar Kavram
Validation Rule Picklist and Null Handling Functions