Explanation of the error
You may come across this Salesforce validation error when you're trying to add or modify approval steps after an approval process got activated:
βAn approval process can't be active until it has at least one approval step
.
Salesforce explains in their documentation this is an expected behaviour for the approval process. More information in this article:
βUnable to delete or add Approval Process Step
Note: We've also seen users facing this error after they've changed the email address of the approver (in the approval process) in their source environment.
Resolution
In the org from which you're deploying changes to the approval process:
- Find the approval process that failed the validation and deactivate it.
- Use the Clone
option to create a new approval process.
- Delete the originally created approval process.
- Add changes in the cloned approval process, and activate it.
Above steps should allow you to successfully deploy changes made in the approval process as a new item.
β
There are also some things that Salesforce advises to keep in mind when maintaining existing approval processes, including activating and deleting them:
βConsiderations for Managing Approvals
Disclaimer: This error is returned directly by Salesforce, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.