Overview
There might be a scenario where the restore fails while disabling and enabling validations, which immediately stops the restore tasks. The article explains the scenarios for validation issues that result in restore failure.
Check the Deployment status
To check the Deployment status in the destination org to figure out the failing validations:
Log in to Salesforce org.
Go to setup ==> Deployment status.
Open the latest Deployment, which has failed.
The API Names in the error component are the validations that are failing.
An example is attached below.
Resolution
You can overcome the restore issue due to deployment validation using below methods:
Exclude validation from the Data template
Exclude validation from the Environment hub
Turn the validations OFF in the destination org.
Exclude validation from the Data template
Procedure:
Navigate to the template.
Click Show Details -> Template Settings.
Go to the validations tab and search for the failed validations, select them, and click Save Selection.
Re-run the restore.
๐ NOTE
These settings are valid only for the current data template. A new template will require new settings.
Exclude validation from the Environment hub
To exclude these validations for every template, exclude them from the environment hub.
Procedure:
Navigate to the Environment Hub tab.
Click the Show details option from the dropdown of the destination org.
Choose the validation type, select the validation that needs to be excluded and click Save.
Turn the validations OFF in the destination org manually.
Open the validations that are failing in the destination org as shown in the Deployment status.
Turn them OFF one by one.
For example, if the validation that is failing is Flow, Workflow, deactivate it.Run the Refresh validation for the destination org.
Rerun the restore.
Once the restore is completed, activate back the validations in the salesforce org.
Run refresh validations in the org.