An administrator is configuring a validation rule on the custom object Asset_Service_Contract__c to enforce data quality standards. Business requirements state that whenever a contract status is set to 'Active', the custom field Renewal_Date__c must not be left blank, and the custom text field Compliance_Audit_Code__c must strictly follow a specific format starting with 'AUD-' followed by exactly three alphanumeric characters (such as 'AUD-101' or 'AUD-A12'). Which TWO validation rule formula syntax configurations will correctly enforce these data quality requirements? (Select 2 answers)
- AND( ISPICKVAL(Status__c, 'Active'), OR( ISBLANK(Renewal_Date__c), NOT(REGEX(Compliance_Audit_Code__c, 'AUD-[A-Za-z0-9]{3}')) ) )Answer
- AND( TEXT(Status__c) = 'Active', OR( ISBLANK(Renewal_Date__c), NOT(REGEX(Compliance_Audit_Code__c, 'AUD-[A-Za-z0-9]{3}')) ) )Answer
- CAND( ISPICKVAL(Status__c, 'Active'), ISBLANK(Renewal_Date__c), NOT(REGEX(Compliance_Audit_Code__c, 'AUD-[A-Za-z0-9]{3}')) )
- DOR( ISPICKVAL(Status__c, 'Active'), ISBLANK(Renewal_Date__c), REGEX(Compliance_Audit_Code__c, 'AUD-[A-Za-z0-9]{3}') )
- EAND( ISPICKVAL(Status__c, 'Active'), ISBLANK(TEXT(Renewal_Date__c)), REGEX(Compliance_Audit_Code__c, 'AUD-[A-Za-z0-9]{3}') )
Answer
The two correct validation rule formulas evaluate the status picklist using either ISPICKVAL or TEXT conversion, combined with an OR block containing ISBLANK for the date field and a negated REGEX function for format enforcement.
The correct validation rules evaluate whether the contract status is set to Active using either ISPICKVAL or TEXT status evaluation, combined with an inner OR block that checks if the renewal date is missing or if the compliance audit code fails the regular expression format test. Because validation rules block saving when the formula evaluates to TRUE, negating the REGEX match ensures incorrectly formatted codes trigger the error.
Step-by-Step Solution
Key Concept
Validation rule formulas return TRUE to block record saving, requiring logical OR constructs to enforce multiple independent data completeness and pattern conditions.
Estimated Time:2m 0s