Important: Managed package metadata cannot be disabled by Gearset. This is due to Salesforce limitations. Many managed packages give alternate ways to disable rules, triggers and flows. Please refer to the managed package documentation.
In addition, duplicate rules with custom filter logic that acts on a custom field cannot be disabled. For more information, please refer to the Salesforce issue.
Navigating to the disable validation rules, triggers and flows page
For Sandbox seeding and data deployment, click the
VIEW AND DISABLE RULESbutton on the configure data masking page.
For data restoration, click on the
View and disable rules...button on the summary of data to restore page:
Once the metadata has been analysed, you’ll be able to view a list of metadata that can be disabled.
Hover over the question mark icon, to see detailed explanations of the problem and solution.
Disabling metadata to load legacy data
When deploying legacy, you may encounter issues because the data is incompatible with the current validation and duplicate rules or cause side effects due to triggers and flows.
Gearset provides an option to temporarily disable certain metadata. This ensures that records can be successfully deployed.
Below are examples of problems that Gearset currently solves by temporary metadata changes during deployment.
Disabling validation rules, duplicate rules, restricted picklists and field history tracking
Active validation rules in the target org are a frequent cause of FIELD_CUSTOM_VALIDATION_EXCEPTION errors in data deployments (see our documentation on how to resolve such errors).
An Account record in the source org contains a "Revenue" value that exceeds the threshold set by a custom validation rule. Deploying this record to the target org fails because it violates the validation rule.
Problem
Some legacy records violate your validation rules.Solution
Temporarily disable your validation rules so that you can deploy legacy records.
You're deploying Contacts, and some records in the source org share the same email address as existing Contacts in the target org. A duplicate rule in the target org prevents these records from being deployed.
Problem
Some legacy records violate your duplicate rules.Solution
Temporarily disable your duplicate rules so that you can deploy legacy records.
An "old Opportunity record" uses a picklist value for "Stage" that was deprecated or made inactive after the data was created. Deploying the record fails because the picklist restriction in the target org no longer permits this value.
Problem
Some legacy records use inactive picklist values that aren’t allowed in restricted picklists.Solution
Temporarily make the picklist’s value list unrestricted so that you can deploy legacy records.
Additionally, if you have records in the source that use a picklist value that is throwing an INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST error, you can select Custom fields related to that picklist to include in the deployment.
Problem
Attempting to restore legacy records that uses a picklist value that triggers the
INVALID_OR_NULL_FOR_RESTRICTED_PICKLISTerror, due to the inactive picklist value in the target environment.Solution
Include the associated
Custom fields(that have the referenced picklist value) in the deployment to temporarily make the picklist value unrestricted to be able to deploy the legacy records.
For in-place masking, field history tracking can record the unmasked value when updating the record.
Problem
Some Custom objects track the history of fields which may compromise the masking of PII data.
Solution
Temporarily disable history tracking on these objects so that PII data is not saved.
Note: this will not delete any of the historical field values. It will only disable the creation of these values when masking and deploying the data.
Disabling automations
When migrating data into Salesforce, it’s important to ensure that automations such as Workflow rules, Apex triggers, and Flows do not run when you deploy the records.
Running these automations on legacy data could trigger unnecessary notifications, create redundant records, or cause other unintended data modifications. Gearset provides the ability to temporarily disable automations during deployment to avoid these issues.
Active flows and process builders in the target org can also cause errors during data deployments, such as "CANNOT_EXECUTE_FLOW_TRIGGER: We can't save this record because the process failed."
A Flow is set up to automatically send a welcome email when a new Lead is created. Deploying a large set of legacy Leads triggers the flow for each record, potentially overwhelming your email system.
Problem
Some record-triggered flows will run when you deploy records.Solution
Temporarily disable your flows so that they don’t run during the deployment.
You’re deploying a batch of "Opportunity records" that should bypass workflow-triggered actions, like automatically sending approval requests. These actions interfere with the data migration and create additional tasks in the target org.
Problem
Some workflow rules will run when you deploy records.Solution
Temporarily disable your workflow rules so that they don’t run during the deployment.
Active triggers in the target org 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.
An Apex trigger is configured to update related records whenever an Account is created or updated. Deploying a large set of Accounts causes the trigger to run, resulting in unintended cascading updates to related records in the target org.
Problem
Some Apex triggers will run when you deploy records.
Solution
Temporarily disable your Apex triggers so that they don’t run during the deployment.
Running the metadata deployment
Only rules, picklists and triggers related to the specific data that’s being imported will be listed, along with all flows. Select what you want to disable and then click Start deactivation deployment.
After the metadata has been disabled, you will get a confirmation message.
Re-enabling validation rules, triggers and flows
When your data deployment has completed, you can re-enable the rules, triggers and flows by selecting Rollback deactivation deployments at the bottom of the deployment summary:
License requirements for Rollback feature:
Rollback is usually a Teams feature in Gearset. However, this special type of rollback deployment (specifically to rollback deactivated metadata during a data deployment) can be done by anyone with a Platform, Starter, Teams, or Enterprise license.
You can also rollback deployments in the Deployment history page of the Gearset app.
Filter the list to find the Disabled rules for data deployment deployments.
Then click on the Roll back... button to enable the rules, triggers, and flows.








