Active validation rules in the target org are a frequent cause of FIELD_CUSTOM_VALIDATION_EXCEPTION errors in data deployments. Sometimes it's just not possible to update your existing records so that they conform to your new validation rules.

Active triggers in the target can cause System.LimitException: Apex CPU time limit exceeded if they fire on lots of records in your deployment. Any unhandled exceptions thrown by triggers will also cause deployments to fail.

One of the ways you can avoid these types of error is to disable the validation rules and triggers before you run the deployment. Gearset can help you do that without the need to navigate away to your org.

Click the View and disable rules... button in the bottom-right of the pre-deployment summary page (next to DEPLOY DATA) to prepare a special metadata comparison.

The comparison might take several minutes to prepare:

Once it's ready, you'll be able to view the comparison. (It'll open in a new tab.)

Choose which rules you want to disable and then deploy your chosen changes just like a normal metadata deployment.

Once you've finished your data deployment, you can re-enable the rules by rolling back the metadata deployment via the deployment history:

Rollback is usually an Enterprise feature, but this special type of deployment can be rolled back by anyone with a Pro or Enterprise license.

Did this answer your question?