You need to sign in to do that
Don't have an account?

Automatic rejection for records in an approval process
Hi experts,
I have a custom object Submittals and an approval process built for it.
The use case is:
A record was submitted and is pending approval
If a field ("status") on the Submittal is changed to "closed" all pending submittals should be automatically rejected.
How to accomplish this?
Thank you!
I have a custom object Submittals and an approval process built for it.
The use case is:
A record was submitted and is pending approval
If a field ("status") on the Submittal is changed to "closed" all pending submittals should be automatically rejected.
How to accomplish this?
Thank you!

I think you can add a trigger on this object, once status is set to "Closed", fire following code (below code only handles one record) and make sure the approvers are set up properly:

Thank you for taking the time to reply. In almost all cases, there will be more than 1 item pending approval.

then you need to change above code to process multiple records in the trigger