How Migrate to Flow Can Trip Your Custom Validations

Salesforce is guiding its users toward a unified automation platform with the impending “End of Support” for Workflow Rules and Process Builder. This transition sets Flow Builder as the future for declarative automation, offering a better, more intuitive interface capable of handling complex business processes.

SurveyVista: Effortless Data Collection to Action

To facilitate this transition, Salesforce introduced the “Migrate to Flow” tool, designed to convert existing automations into the modern Flow format. Organizations need to understand the nuances of this migration, as the tool has a few limitations. Let’s dive into what this change looks like and how to best prepare for it. 

What Does “End of Support” Mean?

Salesforce announced that they will stop supporting Process Builders and Workflow rules by December 31, 2025. What does that mean? If your automations work the way they were intended, you do not have to migrate them to flow. You can leave them as they are for the time being. But, ideally you should consider migrating them to flow, knowing that Salesforce will not support you through their support/success ticketing platform if a problem occurs.

The migration tool plays a role in this transition by offering a method to convert existing automations built in Workflow Rules and Process Builder into the Flow format. However, is it truly as seamless and comprehensive as claimed? Depending on how the start criteria is built, and what actions are included (such as time delay actions), your legacy automations may not be supported by the Migrate to Flow tool.

Background: The Automation Evolution

Workflow Rules and Process Builder were instrumental in automating business processes without extensive coding. However, Flow has emerged as a stronger, unified solution.

Implications for Salesforce Users

For those relying on the old tools, transitioning requires a strategic plan. The main considerations are:

Free Mentorship With Talent Stacker
  • Revisiting Automations: Check current automations for replication or improvement in Flow.
  • Skill Development: Flow’s broader functionalities mean teams may need training.
  • Planning Migration: Moving complex automations takes time, needing testing and iterations.

Navigating the Transition

To migrate smoothly:

  • Conduct an Automation Audit: Document all old processes. Identify critical ones and optimization chances.
  • Use Salesforce Resources: Salesforce provides documentation and community support for Flow learning.
  • Develop a Phased Plan: Be intentional about which flows to tackle first.
  • Test Thoroughly: Test Flow automations well before stopping old ones.
  • Seek Expert Help: For complex migrations, consult a Salesforce expert for streamlined processes.

The Migrate To Flow Challenge

In addition to all the pain points mentioned, I faced another interesting challenge as a consultant on a migrate-to-flow project.

The organization in question utilized several workflow rules for field updates and email notifications. Their process aimed to flag Opportunities with a cautionary “You can’t touch this” label, while simultaneously alerting managers via email when the Account was flagged.

Here’s where it gets interesting: workflow rules have the unique ability to bypass validation rules. I am not sure why that’s the case, but workflow rules and processes were never bothered by custom validation rules built into the Org. Flows, on the other hand, adhere strictly to validation rules, introducing complexity to the migration process.

Validation Rule Road Block

After carefully migrating the workflow rules, I found that the resulting flow was tripping a validation rule.

Flow Custom Error Message Used as a Validation Rule

The entry criteria of the originating workflow and the custom validation rule did not overlap 100%, either. I needed to re-engineer the whole thing. But I thought of ways I can move forward. I could build workarounds to bypass the validation rules for the flow to run. Jen W Lee and guest Parker Edelmann covered that here. However, that looked too complicated to be easily maintained in the future.

The Solution

I had reservations about the custom error functionality within record-triggered flows. I generally prefer not to stop a user’s action by throwing an exception. However, this feature ended up being the answer to resolving the migration challenge.

I incorporated a Decision element into the Flow. This element applied the necessary validation criteria after all required actions were executed. If the criteria were met (meaning the validation failed), a subsequent Custom Error Element displayed a clear, user-facing validation message.

This technique worked! It demonstrated how the custom error element can be used to effectively replace and replicate custom validation rules, offering a solution within Flow Builder.

The Recommendation

You may find that it is necessary to migrate some of your custom validations to flow in addition to your legacy workflow rules and process builder automations.

As Salesforce retires its legacy automation tools, migrations will not always be simple, but they are an opportunity. This shift forces orgs to take a closer look at the logic they have accumulated over the years, refine what no longer serves them, and rebuild with the clarity and capability that Flow provides. Whether you are tackling validation rule conflicts, rewriting complex logic, or rethinking your entire automation strategy, approaching this transition intentionally will set your org up for long-term stability. 

Read more about what “End of Support” means for your workflows and processes HERE

Do not hesitate to ask me your questions. I am here to help.

Read further on Migrate to Flow here

Getting back to the basics of Flow

Migrate to Flow (Beta) in Spring 22

Andy Engin Utkan

Andy Engin Utkan is a Salesforce MVP with 24 certifications. He is the founder of Salesforce Consulting Partner BRDPro Consulting. Utkan is a consultant, trainer, and content creator, focusing on automating business processes using Salesforce flow. He is recognized for his expertise in Salesforce flow, providing guidance through various courses and contributing actively to the Salesforce community.
Back to top button

Discover more from Salesforce Break

Subscribe now to keep reading and get access to the full archive.

Continue reading