Validation Rules That Block Your Own Automations
“Your validation rule doesn't care if a Flow or trigger made the change.”
What Happened
Added a validation rule requiring the Description field on Opportunities. Users loved it. Then our automated lead-to-opportunity conversion Flow started failing because it didn't populate Description. Then the nightly batch integration failed. Then the data migration failed. Every automation that touches Opportunity broke. The validation rule didn't know the difference between a human and a Flow.
The Wrong Way
<!-- Validation Rule: Require_Description --> Error Condition Formula: ISBLANK(Description) Error Message: "Description is required." <!-- Blocks EVERYONE - users, flows, triggers, integrations, data loader -->
The Right Way
<!-- Validation Rule: Require_Description_From_UI --> Error Condition Formula: AND( ISBLANK(Description), NOT($Permission.Bypass_Validation__c), NOT(ISNEW() && ISBLANK(CreatedById)) ) Error Message: "Description is required." <!-- Custom Permission: Bypass_Validation --> <!-- Assigned to Integration User profile and automation-specific permission sets --> <!-- Even better: use a Custom Metadata bypass framework --> <!-- Bypass_Setting__mdt records control which validations are active --> <!-- Toggle bypasses per-user or per-automation without deployment -->
The Lesson
Every validation rule needs a bypass mechanism. Use Custom Permissions assigned to integration users and automation profiles. Otherwise your own automations will fight your own rules.
Enjoyed this? Get more like it.
Glen's Musings — AI, investing, and building things. Occasional. Free.
More Admin Mistakes
Creating an Infinite Loop with Record-Triggered Flows
Flow updates record. Update triggers Flow. Flow updates record. Repeat until Salesforce gives up.
Read moreAnnoyingManaging Access with Profiles Instead of Permission Sets
Profiles are for login settings. Permission Sets are for everything else.
Read morePainfulWorkflow Rules, Process Builder, and Flows All Running on the Same Object
Three automation tools on one object means nobody knows what's happening.
Read more