RevOps Docs for Startups
  • Welcome
  • Getting Started
    • Quickstart
    • About LeanScale
  • Growth Modeling
    • Building a Growth Model
      • Growth Model Assumptions
      • Growth Model Approaches
      • Growth Model Segmentations
    • Sales Capacity Plan
    • Marketing Plan
    • Customer Success Plan
  • Go-to-market Lifecycle
    • Go-to-Market Lifecycle
    • Lead Lifecycle
    • Sales Lifecycle
    • Customer Lifecycle
    • Proof of Concept Lifecycle
    • Lifecycle Measurement
  • Lead Attribution
    • Attribution Overview
    • Lead Source Taxonomy
  • Measuring Metrics
    • Reporting and Data Analytics
    • Sales Metrics
      • Created Pipeline
      • Weighted Pipeline
    • Marketing Metrics
      • Lead Impact Matrix
      • CAC to LTV
    • Customer Success Metrics
      • Net Retention
    • Partnership Metrics
    • Presenting Metrics
  • GTM Tech Stack
    • GTM Tech Stack Overview
    • When To Buy New Systems
    • Driving System Adoption
    • CRM Considerations
      • User-Oriented CRM
      • Data & Reporting CRM
      • Security-Focused CRM
  • Aligning Sales/Marketing
    • Alignment Overview
    • How to Align?
    • What is an SQL?
    • Building Marketing Operations
    • Defining GTM Process
    • Interviewing GTM Leaders
    • Finding The Right Talent
  • System Demos
    • Data Enrichment
      • Clay
      • Traction Complete
    • Conversational Intelligence
      • Gong
      • Unthread
    • CPQ
      • Dealhub
      • Salesbricks
    • Data Analytics
      • RevVue
      • QFlow
  • CRM Tips
    • Salesforce
      • Create Opp from Contact
      • Validation Rules in Flow
      • Roll Up Summary Field
      • Close Date Change Counter
      • Lead Stages
      • Sales Stages
      • Customer Stages
      • Next Step Fields
      • Lead Source Taxonomy
      • Proof of Concept Stages
      • Displaying Record Information
      • Display Dynamic Lists
      • Messages to End Users
      • Create Custom Buttons
      • Tips for Data Loader
      • Salesforce Inspector Reloaded
      • SFDC Navigator for Lightning
      • Bypass Validation Rules
      • Sales Manager Notes Field
      • Renaming Fields and Objects
      • Getting Faster to Record ID
    • Hubspot
      • Disable Picklist Options
      • Create Yesterday's Date
      • Create Today's Date
  • Strategic Walkthroughs
    • Revenue Operations Flywheel
    • Post-Fundraise Playbook
    • Building Board Decks
    • Building Dashboards
      • CEO Dashboards
      • Executive Dashboards
      • Marketing Dashboards
      • Sales Dashboards
      • CS Dashboards
      • Funnel Analytics
    • ChatGPT as a Salesforce Admin
    • Sales Commission Plans
    • Building Sales Territories
Powered by GitBook
On this page

Was this helpful?

  1. CRM Tips
  2. Salesforce

Validation Rules in Flow

PreviousCreate Opp from ContactNextRoll Up Summary Field

Last updated 6 months ago

Was this helpful?

How to Create Validation Rules in Salesforce Using Flows

Introduction

Salesforce introduced a new way of creating validation rules using flows a few months ago. This blog post will show you how to create a validation rule flow to prevent users from moving an opportunity to the "Use Case Defined" stage without completing the "Terms in Months" field.

Prerequisites

  • Salesforce org with the "Flow Builder" permission

  • Opportunity object with a "Terms in Months" field and a "Stage Name" field

Step-by-Step Guide

  1. Create a new flow from the Flow Builder.

  2. Select the "Record-Triggered Flow" template.

  3. Set the following flow properties:

    • Flow Name: Validation Rule Test

    • API Name: Validation_Rule_Test

    • Trigger: Record is updated or created

    • Object: Opportunity

  4. Keep the entry conditions wide for simplicity.

  5. Rename the flow to "Validation Rule Test".

  6. Decide if you want one validation per flow record or if you want to use one flow that combines all the validation rules.

  7. Create a validation rule for the specific scenario:

    • Criteria: Stage Name is changed

    • Condition: Terms in Months is null

    • Stage Name is equal to "Use Case Defined"

  8. Save the validation rule.

  9. When the conditions are met, include a "Custom Error" element in the flow.

  10. Configure the custom error message:

    • Label: Custom Error Message

    • Display Type: In a window

    • Message: Please add Terms in Months to move into the Use Case Defined stage.

  11. Activate the flow.

Benefits of Validation Rule Flows

There are two clear benefits of having validation rules as flows:

  1. Validation rules in a flow can be executed first before every other flow, which prevents users from seeing confusing error messages.

  2. You can have one flow that aggregates all the other validation rules on an object, making it easier to manage and maintain validation rules.

Conclusion

Validation rule flows are a powerful tool that can be used to improve the user experience and enforce data integrity in Salesforce. By following the steps in this blog post, you can easily create validation rule flows to meet your specific business needs.