Question

Difficulty: HardValidation Rules and Data Quality Enforcement

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.)

  1. NOT(ISNEW()) to restrict the rule evaluation strictly to record updates rather than new record creation.Answer
  2. 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
  3. C
    ISCHANGED(Manager_Approval_Code__c) as a substitute for checking whether the field is blank.
  4. D
    PRIORVALUE(Status__c) = "Approved" to verify the record was previously in approved status.
  5. E
    VLOOKUP(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

1
Determine context condition for update operations.
Identify that NOT(ISNEW()) evaluates to true when modifying existing records.
The requirement specifically specifies existing records being updated.
2
Construct error condition for picklist and pattern requirements.
Combine ISPICKVAL(Status__c, 'Approved') with OR(ISBLANK(...), NOT(REGEX(...))).
Validation rules fire when the formula expression returns true, so invalid states (blank code or non-matching REGEX pattern) must evaluate to true when status is Approved.

Key Concept

Validation Rule Logic and Pattern Enforcements with REGEX and Record Context Functions
Rate this question