Match each business requirement for data quality enforcement with the Salesforce validation rule formula that correctly implements the logic.
- Prevent changes to a custom Discount Percent field after an Opportunity has been closed.AND( ISCHANGED( Discount_Percent__c ), PRIORVALUE( IsClosed ) = TRUE )
- Require a Justification Note only when a Case's Status picklist is changed to 'On Hold'.AND( ISCHANGED( Status ), ISPICKVAL( Status, "On Hold" ), ISBLANK( Justification_Note__c ) )
- Enforce that a custom Tax Identification Number field strictly follows a format of two letters followed by seven digits.NOT( REGEX( Tax_ID__c, "[A-Za-z]{2}[0-9]{7}" ) )
- Prevent users from selecting a past date in the Target Close Date field upon initial record creation.AND( ISNEW(), Target_Close_Date__c < TODAY() )
Cevap
1. Preventing edits to Discount Percent on closed opportunities corresponds to using AND( ISCHANGED( Discount_Percent__c ), PRIORVALUE( IsClosed ) = TRUE ).
2. Requiring a Justification Note when changing Status to 'On Hold' corresponds to AND( ISCHANGED( Status ), ISPICKVAL( Status, 'On Hold' ), ISBLANK( Justification_Note__c ) ).
3. Validating Tax Identification Number format corresponds to NOT( REGEX( Tax_ID__c, '[A-Za-z]{2}[0-9]{7}' ) ).
4. Restricting past dates on creation corresponds to AND( ISNEW(), Target_Close_Date__c < TODAY() ).
2. Requiring a Justification Note when changing Status to 'On Hold' corresponds to AND( ISCHANGED( Status ), ISPICKVAL( Status, 'On Hold' ), ISBLANK( Justification_Note__c ) ).
3. Validating Tax Identification Number format corresponds to NOT( REGEX( Tax_ID__c, '[A-Za-z]{2}[0-9]{7}' ) ).
4. Restricting past dates on creation corresponds to AND( ISNEW(), Target_Close_Date__c < TODAY() ).
Each validation rule formula accurately captures the required context: PRIORVALUE detects state prior to save for record lock scenarios, ISCHANGED combined with ISPICKVAL and ISBLANK handles picklist-driven conditional requirements, NOT(REGEX(...)) fires validation errors on non-conforming text patterns, and ISNEW restricts date checks to record insertion.
Adım Adım Çözüm
Anahtar Kavram
Validation Rule Formula Functions (PRIORVALUE, ISCHANGED, REGEX, ISNEW, ISBLANK)
Tahmini Süre:2m 0s