[SalesForce] Validation Rules not fired on Approval

I am having few validation rules on Opportunity, which should be fired when StageName is "Closed Won". An example validation rule is shown below

AND (
    ISPICKVAL(StageName, 'Closed Won'), ISBLANK( SomeOppField__c )
)

Opportunity > StageName = "Closed Won" happens after Approval > Field Update.

Somehow none of the validation rule fires after Opportunity is approved to closed won, my requirement is to block approval process, if data on opportunity is missing.

Best Answer

Workflow rule field updates (and hence by association, Approval Process field updates) don't fire Validation Rules. Per the doc

Because updates to records based on workflow rules don’t trigger validation rules, workflow rules can invalidate previously valid fields.

The reason for this is that time-based workflow actions and approval processes don't really have any mechanism for catching errors and asking the user to resolve them. So, SFDC takes the view that it is your job to make sure that you design workflows and approval processes to not run into errors (in your case, cueing the user to not even submit the record for approval if the object is in some state)

Related Topic