A Operations Manager at a solar installation enterprise requires that whenever a custom object record named Work_Order__c has its Status__c picklist field set to "Closed", both the Completion_Date__c date field and the Resolution_Summary__c text field must contain data. If either field is missing a value when the status is Closed, the record must fail validation and present an error message to the user. Which formula should be configured in the validation rule to enforce this data quality standard?
- AND(ISPICKVAL(Status__c, "Closed"), OR(ISBLANK(Completion_Date__c), ISBLANK(Resolution_Summary__c)))Answer
- BISPICKVAL(Status__c, "Closed") && (Completion_Date__c == NULL || Resolution_Summary__c == NULL)
- CMap the Status__c, Completion_Date__c, and Resolution_Summary__c custom fields on the Lead Conversion Field Mapping setup page to require completion prior to saving.
- DRemove the "Closed" picklist value from the Work Order Record Type picklist assignment settings until both fields are populated by the user.
Answer
The validation rule formula using AND(ISPICKVAL(Status__c, "Closed"), OR(ISBLANK(Completion_Date__c), ISBLANK(Resolution_Summary__c))) correctly enforces the requirement.
The correct formula uses ISPICKVAL to evaluate the picklist field Status__c and checks if either Completion_Date__c or Resolution_Summary__c is blank using OR(ISBLANK(...), ISBLANK(...)). Combining these within an AND statement ensures the validation rule evaluates to true—and blocks record saving—only when the status is Closed and one or both mandatory fields lack values.
Step-by-Step Solution
Key Concept
Validation Rule Syntax and Data Quality Enforcement
Estimated Time:1m 30s