Basically, I want to have validation rules run when a step in an approval process is approved. I would like the rule to take into account which step triggered the rule, so that each step can have different requirements for approval. Is this possible? Thanks!
A custom field for Step Number, or the Status field you were referring to
So on each Approval Step, say Step 1 Have an Approval Action to update the field to Step 1, indicating that Step 1 is approved. Have a validation rule which summarises the data requirements for approval
OR( AND(Text(Status__c) = 'Step 1', ISBLANK(AccountNumber__c)), // Step 1 Approval Check AND(Text(Status__c) = 'Step 2', ISBLANK(SomeOtherField__c) // Step 2 Approval Check )
This will return an error to the Approver in each step if they haven't supplied the required information before approving. (The validation rule will be triggered by the Process attempting a Field Update on Approval)
That might not work. login.salesforce.com/help/doc/en/approvals_considerations.htm says 'Field updates don’t evaluate custom validation rules on fields.' :/ So this may not be possible to do
Don't know if an addError via a trigger will be any different.