A system administrator is building data validation rules for a custom object named Expense_Report__c. The business requirement states that when an expense report status is updated to 'Submitted', the 'Reimbursement_Account_Number__c' field must not be left blank, and validation must evaluate correctly even if field values are modified during record updates. Which TWO validation rule configuration principles or formula functions must the administrator implement to satisfy this logic and ensure robust data quality enforcement?
- Use AND(ISPICKVAL(Status__c, 'Submitted'), ISBLANK(Reimbursement_Account_Number__c)) to ensure the formula correctly triggers when the status is Submitted and the account number is null or empty.Cevap
- BUse PRIORVALUE(Status__c) = 'Submitted' as the sole entry condition to check if the record was previously submitted before validating field emptiness.
- CRely on dynamic form field visibility settings on the record page to prevent users from saving blank values when the status changes to Submitted.
- Combine ISCHANGED(Status__c) with ISPICKVAL(Status__c, 'Submitted') and ISBLANK(Reimbursement_Account_Number__c) if validation should specifically fire upon transition into the Submitted state.Cevap
- EConfigure a matching rule on Expense_Report__c to enforce that Reimbursement_Account_Number__c is populated prior to validation rule execution.
Cevap
The administrator should use AND(ISPICKVAL(Status__c, 'Submitted'), ISBLANK(Reimbursement_Account_Number__c)) for standard validation and incorporate ISCHANGED(Status__c) when checking for state transitions.
Validation rules fire when the formula expression evaluates to TRUE. Using ISPICKVAL to evaluate picklist values combined with ISBLANK to safely evaluate missing text data correctly detects invalid records. Adding ISCHANGED ensures the rule evaluates specifically during the stage transition.
Adım Adım Çözüm
Anahtar Kavram
Salesforce Validation Rule Formula Functions (ISPICKVAL, ISBLANK, ISCHANGED) and Data Integrity Scope