An administrator at a financial services firm is configuring a validation rule on the custom object Loan_Application__c. The business requirement states that whenever an existing loan application record is updated and its Status__c picklist field is set to 'Approved', the Manager_Approval_Code__c text field must not be left blank and must match a specific format starting with 'AC-' followed by numeric digits. Which TWO criteria or formula function expressions should the administrator include in the validation rule to meet these requirements accurately? (Select TWO answers.)
- NOT(ISNEW()) to restrict the rule evaluation strictly to record updates rather than new record creation.Answer
- AND(ISPICKVAL(Status__c, "Approved"), OR(ISBLANK(Manager_Approval_Code__c), NOT(REGEX(Manager_Approval_Code__c, "^AC-[0-9]+$")))) to evaluate status value and enforce required code format.Answer
- CISCHANGED(Manager_Approval_Code__c) as a substitute for checking whether the field is blank.
- DPRIORVALUE(Status__c) = "Approved" to verify the record was previously in approved status.
- EVLOOKUP(Manager_Approval_Code__c, Status__c, "Approved") to check validation values across records.
Answer
The correct selections are the expression using NOT(ISNEW()) to limit execution to record updates, and the combined AND/OR formula with ISPICKVAL, ISBLANK, and NOT(REGEX(...)) to enforce pattern compliance and mandatory entry.
To validate existing records upon update, NOT(ISNEW()) ensures the rule fires only when existing records are updated. Furthermore, combining ISPICKVAL with an OR condition containing ISBLANK and NOT(REGEX(...)) correctly flags records where the status is set to Approved but the approval code is missing or does not match the required pattern.
Step-by-Step Solution
Key Concept
Validation Rule Logic and Pattern Enforcements with REGEX and Record Context Functions