Question

Difficulty: Very hardValidation Rules and Data Quality Enforcement

An administrator at Northern Trail Outfitters is building a validation rule on the Opportunity object to enforce data quality standards during stage progression. The rule must trigger an error when an Opportunity is moved to 'Closed Won' with an AmountAmount exceeding 100,000100,000 if the custom picklist field Executive_Sponsor_Approval__cExecutive\_Sponsor\_Approval\_\_c is left blank. Additionally, to avoid breaking historical records updated via automated background processes, the rule must only enforce this requirement if the record is being edited by a user and either the StageNameStageName or AmountAmount field was modified during the current transaction. Which TWO formula conditions must be combined inside the AND()AND() function of the validation rule to meet these requirements correctly?

  1. ISPICKVAL(StageName, 'Closed Won') && Amount > 100000 && ISBLANK(TEXT(Executive_Sponsor_Approval__c))Answer
  2. (ISCHANGED(StageName) || ISCHANGED(Amount))Answer
  3. C
    ISBLANK(Executive_Sponsor_Approval__c) && PRIORVALUE(Amount) < 100000
  4. D
    StageName = 'Closed Won' && Amount > 100000 && Executive_Sponsor_Approval__c == NULL
  5. E
    NOT(ISNEW()) && PRIORVALUE(StageName) == 'Closed Won'

Answer

The validation rule requires combining two core condition logic blocks: first, converting the picklist value to text to verify if it is blank along with checking the stage and amount threshold; second, utilizing ISCHANGED() on StageName or Amount to ensure historical untouched records do not trigger validation error messages upon background edits.
The correct selection combines two vital formula practices: first, using ISPICKVAL() for stage selection alongside ISBLANK(TEXT()) for evaluating empty picklists; second, wrapping key fields with ISCHANGED() to restrict validation enforcement exclusively to records where the relevant opportunity fields are modified.

Step-by-Step Solution

1
Analyze picklist null checking in formula fields.
Picklist fields cannot be passed directly into ISBLANK() without wrapper functions. The formula must use ISBLANK(TEXT(Executive_Sponsor_Approval__c)) or ISPICKVAL().
Salesforce formula syntax requires picklist values to be evaluated using ISPICKVAL() or converted via TEXT() before string functions like ISBLANK() can process them.
2
Evaluate field modification tracking requirements.
Adding (ISCHANGED(StageName) || ISCHANGED(Amount)) ensures the validation fires only when one of the critical driver fields changes.
This prevents validation errors on legacy records when unrelated fields are updated by automated processes or integrations.
3
Combine conditions within the main AND() expression.
The combined formula evaluates to TRUE when the target criteria are met and field changes occur, correctly firing the validation message.
Validation rules fire when the formula expression evaluates to TRUE.

Key Concept

Handling Picklist Null Checks and ISCHANGED Evaluation in Validation Rules
Estimated Time:2m 0s
Rate this question