An administrator at Cloud Kicks is building a validation rule on the custom object Service_Contract__c to maintain high data quality standards. The requirement states that whenever an existing service contract record is updated and its custom picklist field Status__c is changed to 'Approved', the custom currency field Total_Contract_Value__c must not be left blank and must be equal to or greater than $50,000. Which formula expression correctly enforces this requirement while properly accounting for null values?
- AND( NOT(ISNEW()), ISCHANGED(Status__c), ISPICKVAL(Status__c, "Approved"), OR(ISBLANK(Total_Contract_Value__c), Total_Contract_Value__c < 50000) )Answer
- BAND( NOT(ISNEW()), ISCHANGED(Status__c), ISPICKVAL(Status__c, "Approved"), Total_Contract_Value__c < 50000 )
- CAND( ISNEW(), ISPICKVAL(Status__c, "Approved"), OR(ISBLANK(Total_Contract_Value__c), Total_Contract_Value__c < 50000) )
- DAND( NOT(ISNEW()), PRIORVALUE(Status__c) = "Approved", OR(ISBLANK(Total_Contract_Value__c), Total_Contract_Value__c < 50000) )
Answer
The correct formula is AND( NOT(ISNEW()), ISCHANGED(Status__c), ISPICKVAL(Status__c, "Approved"), OR(ISBLANK(Total_Contract_Value__c), Total_Contract_Value__c < 50000) ).
The correct formula evaluates to TRUE (blocking the save with an error) whenever an existing record is edited, the Status__c field is changed to 'Approved', and the Total_Contract_Value__c is either unpopulated (ISBLANK) or less than 50,000.
Step-by-Step Solution
Key Concept
Salesforce Validation Rule Formula Functions and Null Handling
Estimated Time:1m 30s