In my Approval Process, when the record is rejected, the value of a custom field called "Approval Status". is updated to "Rejected" via a Field update in the Final Rejection Actions. Prior to the Approver rejecting the record, we are trying to require them to update a field called "Rejected Reason" which is a picklist of why they are rejecting the record. We have a validation rule that is throwing an error if the Approval Process = "Rejected" and the Rejected Reason is blank. However the validation rule is not firing when the Approval Process is updating the Approval Status field to Rejected AND the Rejected Reason is blank. It is firing if we manually update the Approval Status field to Rejected and the Rejected Reason is blank.
Does anyone know if this is a limiation to Approval Processes?
6 respostas
Hi Phil,
Validation rule will not work on Approval process because of the order of execution. Do the validation using apex trigger.
https://salesforce.stackexchange.com/questions/60114/field-validation-on-approve-or-reject-for-approval-process
https://developer.salesforce.com/forums/?id=906F00000008o0JIAQ
Hope that helps.
Regards,
Jayson