Salesforce Validation Rule Bypass: 4 Powerful Steps for Smoother Data Migration
Migrating data into a new Salesforce org can be more complicated than simply importing a spreadsheet. When legacy records don’t meet the requirements of the new org, Salesforce validation rules can prevent those records from being loaded and cause frustrating validation rule errors.
This is where a Salesforce Validation Rule Bypass can help. Instead of permanently disabling validation rules, you can create a controlled bypass that allows a specific migration user to load applicable records while keeping the validation rules active for everyone else.
For example, a legacy record may have an Active status but no Client Segment. If the new Salesforce org requires Client Segment for Active records, a Salesforce data import could fail. With a properly configured Salesforce Validation Rule Bypass, the designated migration user can load the record without allowing regular Salesforce users to bypass the same validation rule.
However, this approach should not replace proper data cleaning. If the source data can reasonably be cleaned before migration, that is the better solution. A bypass is most useful when cleaning large amounts of legacy data before loading is not a practical option.
In this guide, you’ll learn how to set up a Salesforce Validation Rule Bypass in four steps, using a Custom Permission and Permission Set, modify an existing validation rule, and understand what happens to migrated records after the data load.
Table of Contents
Why Use a Salesforce Validation Rule Bypass During Data Migration?
Before looking at how to bypass validation rules during a Salesforce migration, it helps to understand why validation rules exist in the first place.
Imagine your Salesforce organization requires a Client Segment whenever a record has an Active status.
If a user tries to save an Active record without a Client Segment, the validation rule can prevent the record from being saved.
The challenge comes during a migration, when existing legacy records may not satisfy the same requirements enforced by the new Salesforce org. That's where a controlled Salesforce Validation Rule Bypass can become useful.
Why Can Validation Rules Cause Problems During Migration?
Salesforce validation rules can become a challenge when you are working with legacy data. The source data may have been perfectly acceptable in the client's previous system, while the new Salesforce org may have different requirements.
As a result, records that were previously valid can trigger validation rule errors during the Salesforce data import.
Imagine the legacy data contains several Active records where Client Segment is blank. Normally, Salesforce would prevent those records from being saved because they violate the validation rule.
This is especially frustrating when the data is valid according to the client's legacy system but does not meet the new Salesforce org's requirements.
When Should You Use a Salesforce Validation Rule Bypass?
A bypass can be useful when a migration involves a large amount of legacy data that cannot reasonably be cleaned before loading. The key is to use the bypass as a controlled migration exception, not as a way to avoid data-quality requirements.
- Large-scale Salesforce data migration
- Legacy data that cannot immediately meet new validation requirements
- Controlled migration users
- Temporary data-loading scenarios
- To permanently avoid data-cleaning requirements
- To give normal Salesforce users unnecessary bypass access
- Instead of cleaning the source data when reasonable data cleaning is possible
- As a permanent replacement for a validation rule
Regular Salesforce users will continue to be subject to the validation rule.
The purpose is to create a controlled exception for the migration user, not to remove the underlying business rule.
How to Set Up a Salesforce Validation Rule Bypass in 4 Steps
Setting up a Salesforce Validation Rule Bypass involves four main steps. The interactive guide below lets you move through each step without hiding the actual instructional content from search engines.
Create a Custom Permission
First, create a Custom Permission that will represent the migration bypass. The Custom Permission gives your validation rule something to check when determining whether the current user should be subject to the rule.
- Go to Setup.
- Search for Custom Permissions.
- Create a new Custom Permission.
- Name it Bypass Validation Rules.
This permission reference is what connects the validation rule to the Custom Permission.
Create a Permission Set
Next, create a Permission Set that contains the Custom Permission. This gives you a controlled way to assign the bypass capability only to the appropriate migration user.
- Go to Permission Sets.
- Create a new Permission Set.
- Name it Bypass Validation Rules.
- Open the Permission Set.
- Find Custom Permissions.
- Add Bypass Validation Rules.
You can assign the bypass capability to a specific user without giving the same exception to everyone in the Salesforce organization.
Assign the Permission Set to the Migration User
Now assign the Bypass Validation Rules Permission Set to the user who will perform the data migration.
Only users who have the appropriate permission will be able to bypass validation rules that have been configured with this logic.
The entire Salesforce organization is not bypassing validation. The exception is limited to users who have been given the appropriate permission.
Modify the Applicable Validation Rules
The final step is to modify the validation rules that need to be bypassed during the migration.
Do not delete or permanently disable the validation rule. Instead, add the following condition:
Salesforce Validation Rule Bypass Example
Let's use the validation rule from the tutorial. The original rule checks whether the record has an Active status while the Client Segment is blank.
What Does the Original Validation Rule Do?
ISPICKVAL( FinServ__Status__c,"Active" ),
ISPICKVAL( Client_Segment__c,"")
)
The AND() function requires all conditions inside it to be true.
Add the Salesforce Validation Rule Bypass Condition
ISPICKVAL( FinServ__Status__c,"Active" ),
ISPICKVAL( Client_Segment__c,""),
NOT( $Permission.Bypass_Validation_Rules )
)
The key addition is:
Breaking Down the Formula
Normal user + invalid data → Validation rule blocks the record.
Migration user + bypass permission → Validation rule does not block the applicable record.
The validation rule itself remains active.
How the Salesforce Validation Rule Bypass Works During Migration
The key difference is the user's permission. Click each user type to see what happens when they try to save a record.
What Happens After a Salesforce Validation Rule Bypass?
A bypass lets the migration proceed, but it does not fix the underlying data. Click through the timeline below to see what happens before, during, and after the migration.
"The migration can load the existing record, but when a user later edits that record, Salesforce may require the missing or invalid information before the record can be saved."
⚡ The Salesforce Migration Problem in 10 Seconds
Here's the situation: your client's legacy data may not satisfy the validation requirements of the new Salesforce org. See what happens — and explore the three possible approaches.
Client Segment: Blank
Using ChatGPT to Modify a Salesforce Validation Rule Bypass
Don't want to manually rewrite a long Salesforce formula? ChatGPT can help you add the bypass condition to an existing validation rule. Use the prompt below as a starting point.
Add this bypass permission NOT( $Permission.Bypass_Validation_Rules ) into the following Salesforce validation rule: AND( ISPICKVAL( FinServ__Status__c,"Active" ), ISPICKVAL( Client_Segment__c,"") )
AND( ISPICKVAL( FinServ__Status__c,"Active" ), ISPICKVAL( Client_Segment__c,""), NOT( $Permission.Bypass_Validation_Rules ) )
🧩 What You're Actually Building With a Salesforce Validation Rule Bypass
A Salesforce Validation Rule Bypass does not turn validation off. Instead, it creates a controlled, permission-based exception for the user performing the migration while keeping the original business rule active for everyone else.
Click each stage below to see how the bypass moves from Salesforce setup to the actual data migration.
Each stage plays a different role in creating a controlled Salesforce Validation Rule Bypass.
The validation rule checks whether the current user does not have the bypass permission. If they do have it, the applicable validation rule will not block the migration record.
NOT( $Permission.Bypass_Validation_Rules )
No bypass permission
The validation rule continues to run normally.
If the record violates the rule, Salesforce
blocks the save.
Has bypass permission
The applicable validation rule does not block
the migration user from loading the affected
legacy records.
The rule stays ON. The bypass is limited to users who have the appropriate permission. The imported data may still require cleanup after migration. Think of the bypass as a temporary migration key, not a permanent replacement for your Salesforce validation rules.
Salesforce Validation Rule Bypass Best Practices
A successful Salesforce data migration is not just about getting records into the new org. The bypass should be controlled before the migration, monitored during the data load, and reviewed afterward.
Before the Migration
Set up the bypass and make sure the migration environment is properly controlled.
During the Migration
Keep the data load controlled and monitor what happens while records are being imported.
After the Migration
Review the imported records and make sure the temporary migration exception is no longer overused.
Common Salesforce Validation Rule Bypass Mistakes to Avoid
A Salesforce Validation Rule Bypass can make a migration much easier, but only when it is implemented carefully. Click each mistake below to see what can go wrong and how to avoid it.
The problem is that this removes the protection for everyone, instead of creating a controlled exception for the migration user.
Instead, keep the validation rule active and use a permission-based bypass.
Do not assign the permission broadly without a clear reason. Keep it limited to the appropriate migration user or users.
The migration user must actually be assigned the Permission Set containing the Custom Permission.
If the permission is not assigned, the validation rule will continue to apply to that user.
The bypass only allows the migration user to get around the applicable validation rule during the data load.
It does not correct incomplete, missing, or invalid data.
Those records may still require cleanup after the migration.
This expectation should be established before the migration begins so everyone understands what the bypass does — and what it does not do.
A Salesforce Validation Rule Bypass should create a controlled migration exception, not become a permanent way around data-quality requirements. Keep the permission restricted, test both user scenarios, and plan for cleanup of records that still do not meet the new Salesforce requirements.
Final Thoughts on Salesforce Validation Rule Bypass
A Salesforce Validation Rule Bypass can be a useful technique when legacy data cannot reasonably be cleaned before a Salesforce migration. The key is to treat the bypass as a controlled, temporary exception — not a permanent solution to data-quality problems.
By using this approach, you can keep Salesforce validation rules active for regular users while giving the designated migration user the controlled access needed to complete the data load.
Use the bypass to solve a migration problem — not to avoid a data-quality problem.
❓ Salesforce Validation Rule Bypass FAQ
Get quick answers about using a Custom Permission and Permission Set to create a controlled Salesforce Validation Rule Bypass during data migration.
Add this permission check to the validation rule:
NOT( $Permission.Bypass_Validation_Rules )
The tutorial uses:
$Permission.Bypass_Validation_Rules
When the current user does not have the bypass permission, the condition evaluates as true and the validation rule can run normally.
No bypass permission → validation rule continues to apply.
Has bypass permission → applicable validation rule does not block the migration.
This provides a controlled way to grant the bypass without giving the capability to every Salesforce user.
The migration user performing the load needs the appropriate bypass permission so the applicable validation rules can recognize the migration exception.
However, the underlying data issue has not disappeared. When a regular Salesforce user later edits one of those records, the validation rule may prevent the record from being saved until the required information is provided.
Once the migration is complete, review the Bypass Validation Rules Permission Set and restrict the permission when it is no longer required.
For example, you can provide your existing validation rule and ask ChatGPT to add:
NOT( $Permission.Bypass_Validation_Rules )
Build Stronger Salesforce Skills
Want to build stronger Salesforce administration and migration skills? Explore Salesforce Masterclass for more practical Salesforce training, tutorials, and hands-on Salesforce guidance.
Explore Salesforce Masterclass →Practical Salesforce training for administrators, consultants, and migration professionals.
One Response