{"id":13114,"date":"2026-08-10T08:45:34","date_gmt":"2026-08-10T08:45:34","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/salesforce\/?p=13114"},"modified":"2026-08-10T08:45:35","modified_gmt":"2026-08-10T08:45:35","slug":"how-to-bypass-validation-rules-in-salesforce-record-triggered-flows","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/salesforce\/2026\/08\/10\/how-to-bypass-validation-rules-in-salesforce-record-triggered-flows\/","title":{"rendered":"How to Bypass Validation Rules in Salesforce Record-Triggered Flows"},"content":{"rendered":"\n<p>While migrating automation is usually straightforward, developers may encounter an unexpected issue: a Flow performing the same update as a Workflow Rule fails because of a Validation Rule.This happens because Workflow Rules and Flows behave differently during Salesforce&#8217;s order of execution.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Validation-Rule.1.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Validation-Rule.1.png\" alt=\"Validation Rule\"><\/a><\/center><font size=\"2\"><center><i>Validation Rule<\/i><\/center><\/font> \n\n\n\n<h2 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Business Requirement<\/mark><\/strong><\/h2>\n\n\n\n<p>An organization has implemented a Validation Rule that prevents users from changing the Opportunity Close Date after the Opportunity reaches the Closed Won stage.<\/p>\n\n\n\n<p>At the same time, the business requires the system to automatically update the Close Date to the actual deal closure date whenever the Opportunity is marked as Closed Won.<\/p>\n\n\n\n<p>Previously, this automation was implemented using a Workflow Rule and worked as expected. After migrating it to a Record-Triggered Flow, the Flow started failing because the Validation Rule blocked the update.<\/p>\n\n\n\n<p><strong>Validation Rule<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\nISPICKVAL(StageName,\"Closed Won\"),\nISCHANGED(CloseDate)\n)<\/code><\/pre>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Flow-Error.2.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Flow-Error.2.png\" alt=\"Validation Failed: Flow Error\"><\/a><\/center><font size=\"2\"><center><i>Validation Failed: Flow Error<\/i><\/center><\/font> \n\n\n\n<h2 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Why does this happen?<\/mark><\/strong><\/h2>\n\n\n\n<p>Workflow Rules can update records without re-triggering Validation Rules, whereas Record-Triggered Flows execute within the normal transaction lifecycle and must satisfy all Validation Rules.<\/p>\n\n\n\n<p><strong>Solution<\/strong>:<\/p>\n\n\n\n<p>Instead of disabling the Validation Rule, we implemented a temporary automation bypass.<\/p>\n\n\n\n<p>The solution uses:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automation_Bypass_DateTime__c (Date\/Time)<\/li>\n\n\n\n<li>Is_Automation_Bypassed__c (Formula Checkbox)<\/li>\n<\/ul>\n\n\n\n<p>When the Flow starts, it stores the current timestamp in the Date\/Time field. The Formula Checkbox returns TRUE if that timestamp is within the last five seconds.<\/p>\n\n\n\n<p>The Validation Rule is then updated to execute only when the checkbox is FALSE.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n    ISPICKVAL(StageName,\"Closed Won\"),\n    ISCHANGED(CloseDate),\n    NOT(Is_Automation_Bypassed__c)\n)<\/code><\/pre>\n\n\n\n<p>Finally, before updating the Opportunity, the Flow sets:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Automation_Bypass_DateTime__c = $Flow.CurrentDateTime<\/code><\/pre>\n\n\n\n<p>This temporarily bypasses the Validation Rule, allowing the Flow to complete successfully. <\/p>\n\n\n\n<p>After five seconds, the Formula Checkbox automatically evaluates back to FALSE, restoring the Validation Rule without requiring any cleanup logic.<\/p>\n\n\n\n<p><strong>Step 1: Create a Date\/Time field<\/strong><\/p>\n\n\n\n<p>Create the following Date\/Time field:<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Create-Field.3.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Create-Field.3.png\" alt=\"Automation Bypass DateTime: Field Creation\"><\/a><\/center><font size=\"2\"><center><i>Automation Bypass DateTime: Field Creation<\/i><\/center><\/font>\n\n\n\n<p><strong>Step 2: Create a Formula Checkbox<\/strong><\/p>\n\n\n\n<p>Create the following Formula Checkbox:<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Create-Field.4.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Create-Field.4.png\" alt=\"Is Automation Bypassed: Field Creation\"><\/a><\/center><font size=\"2\"><center><i>Is Automation Bypassed: Field Creation<\/i><\/center><\/font> \n\n\n\n<p><strong>Step 3: Update the Validation Rule<\/strong><\/p>\n\n\n\n<p>Update the Validation Rule to include:<\/p>\n\n\n\n<p><strong>NOT(Is_Automation_Bypassed__c)<\/strong><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Validation-Rule-Update.5.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Validation-Rule-Update.5.png\" alt=\"Validation Rule Updation\"><\/a><\/center><font size=\"2\"><center><i>Validation Rule Updation<\/i><\/center><\/font>\n\n\n\n<p><strong>Step 4: In the Flow, assign:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Automation_Bypass_DateTime__c =$Flow.CurrentDateTime<\/code><\/pre>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Update-Flow.6.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Update-Flow.6.png\" alt=\"Flow Updation\"><\/a><\/center><font size=\"2\"><center><i>Flow Updation<\/i><\/center><\/font> \n\n\n\n<p><strong>Flow Overview<\/strong><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Flow-Preview.7.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2026\/08\/Flow-Preview.7.png\" alt=\"Flow Overview\"><\/a><\/center><font size=\"2\"><center><i>Flow Overview<\/i><\/center><\/font> \n\n\n\n<h2 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Conclusion<\/mark><\/strong><\/h2>\n\n\n\n<p>Migrating Workflow Rules to Record-Triggered Flows can introduce unexpected validation failures because Flows don&#8217;t inherit the same validation bypass behavior as Workflow Rules.Using a temporary Date\/Time field and a Formula Checkbox provides a simple, secure, and maintainable solution. It keeps Validation Rules active for users while allowing trusted automation to complete system-driven updates.<\/p>\n\n\n\n<p>By following the above blog instructions, you will be able to learn \u201c<strong>How to Bypass Validation Rules in Salesforce Record-Triggered Flows<\/strong>\u201c. If you still have queries or any related problems, don\u2019t hesitate to contact us at <a href=\"mailto:salesforce@greytrix.com\" target=\"_blank\" rel=\"noreferrer noopener\">salesforce@greytrix.com<\/a>. More details about our integration product are available on <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/\" target=\"_blank\" rel=\"noreferrer noopener\">our website<\/a> and <a href=\"https:\/\/appexchange.salesforce.com\/appxListingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noreferrer noopener\">Salesforce AppExchange<\/a>.<\/p>\n\n\n\n<p>We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please contact us at <a href=\"mailto:salesforce@greytrix.com\" target=\"_blank\" rel=\"noreferrer noopener\">salesforce@greytrix.com<\/a>.<\/p>\n\n\n\n<p style=\"text-align: justify\"><b>About Us<\/b><\/br>\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> \u2013 a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.<br><br> Greytrix has some unique solutions for Cloud CRM such as <a href=\"\">Salesforce Sage integration<\/a> for <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/integration\/\">Sage X3<\/a>, <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/sage-100-integration\/\">Sage 100<\/a> and <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/sage-300-integration\/\">Sage 300 (Sage Accpac)<\/a>. We also offer best-in-class Cloud CRM <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/crm-development\/\">Salesforce customization and development services<\/a> along with services such as Salesforce <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/data-migration-support\/\">Data Migration<\/a>, <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/crm-development\/\">Integrated App development<\/a>, Custom App development and Technical Support business partners and end users. Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU&#x2122; integration for Sage ERP \u2013 Salesforce is a 5-star rated app listed on <a href=\"https:\/\/appexchange.salesforce.com\/appxListingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noopener\">Salesforce AppExchange<\/a>.<br> The GUMU&#x2122; Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.<br><br> For more information on our Salesforce products and services, contact us at <a href=\"mailto:salesforce@greytrix.com\">salesforce@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While migrating automation is usually straightforward, developers may encounter an unexpected issue: a Flow performing the same update as a Workflow Rule fails because of a Validation Rule.This happens because Workflow Rules and Flows behave differently during Salesforce&#8217;s order of execution. Validation Rule Business Requirement An organization has implemented a Validation Rule that prevents users\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2026\/08\/10\/how-to-bypass-validation-rules-in-salesforce-record-triggered-flows\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[13,1866,3597,3599,1541,3609,266,3594,3595,367,3617,2467,2578,1772,377,3418,1709,2777,3605,3604,3615,2457,3507,3619,3618,2507,3083,1712,1969,2499,2469,3600,3616,3623,3625,2168,3612,3613,3624,3626,3614,3606,2472,3621,3596,3499,893],"class_list":["post-13114","post","type-post","status-publish","format-standard","hentry","category-salesforce-srv","tag-apex","tag-automation","tag-bypass-validation-rule-salesforce","tag-bypass-validation-rules-in-flow","tag-flow-builder","tag-flow-update-fails-validation-rule","tag-process-builder","tag-record-triggered-flow-2","tag-record-triggered-flow-validation-rule","tag-salesforce","tag-salesforce-flow-currentdatetime-2","tag-salesforce-admin","tag-salesforce-admin-best-practices","tag-salesforce-admin-tips","tag-salesforce-and-sage-100-integration","tag-salesforce-architecture","tag-salesforce-automation","tag-salesforce-automation-best-practices","tag-salesforce-automation-bypass","tag-salesforce-automation-bypass-field","tag-salesforce-automation-timestamp","tag-salesforce-best-practices","tag-salesforce-business-automation","tag-salesforce-crm-automation","tag-salesforce-custom-checkbox-formula","tag-salesforce-declarative-automation","tag-salesforce-developer","tag-salesforce-flow","tag-salesforce-flow-automation","tag-salesforce-flow-best-practices","tag-salesforce-flow-builder","tag-salesforce-flow-bypass-validation","tag-salesforce-flow-currentdatetime","tag-salesforce-flow-design-patterns","tag-salesforce-flow-development","tag-salesforce-flow-error-handling","tag-salesforce-flow-order-of-execution","tag-salesforce-flow-record-update","tag-salesforce-flow-solutions","tag-salesforce-salesforce-automation-guide","tag-salesforce-temporary-bypass-logic","tag-salesforce-temporary-validation-bypass","tag-salesforce-tips","tag-salesforce-validation-best-practices","tag-salesforce-validation-rule","tag-validation-rules","tag-workflow-rules"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/13114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/comments?post=13114"}],"version-history":[{"count":5,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/13114\/revisions"}],"predecessor-version":[{"id":13126,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/13114\/revisions\/13126"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/media?parent=13114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/categories?post=13114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/tags?post=13114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}