Skip to main content

We are using a Territory Model in our Salesforce org. As part of this setup, we have made Country and State mandatory on Account.

Since Address is a compound field, we cannot directly make Country and State individually required using standard field-level required settings. Therefore, we implemented validation rules on the Account object to enforce these requirements.

🔹 Current Implementation

We have separate validation rules on Account such as:

  •  Billing Country required 
  •  Billing State required (based on selected countries) 

These rules ensure data quality for the territory assignment logic.

🔹 Issue During Lead Conversion

During Lead Conversion, these Account validation rules are firing and blocking the conversion.

However, the problem is:

  •  Each validation rule fires separately 
  •  Users receive multiple step-by-step errors (Country first, then State, etc.) 
  •  This creates a poor user experience during conversion 

🔹 Our Attempted Solution

To improve the user experience, we implemented a before-save Lead Record-Triggered Flow to:

  •  Detect missing required fields 
  •  Group all missing field errors 
  •  Show a single consolidated custom error message using Flow error handling 

🔹 Problem We Are Facing

Even after implementing the Flow-based custom error handling:

  •  Account validation rules are still firing first during Lead conversion 
  •  The validation rule error appears before the Flow custom error message
  •  As a result, users do not see the consolidated error message we intended 

🔹 Expected Behavior

We want the system to:

  1.  Validate missing Country/State in a grouped way (preferred UX) 
  2.  Show a single consolidated error message (via Flow or custom logic) 
  3.  Avoid multiple validation rule errors during Lead conversion 
  4.  Ensure smooth Lead → Account conversion experience 

🔹 Question / Help Needed

Is there a better approach to:

  •  Enforce required Country and State on Account without relying heavily on validation rules? 
  •  OR control the execution order so Flow-based validation is shown before Account validation rules during Lead conversion? 
  •  OR design a best practice pattern for handling required Address fields in Territory-based implementations?

@* Sales Cloud - Best Practices * 

2 answers
  1. Jun 15, 5:49 PM

    Hi @Manthan Ghorpade - @Abaid Ur Rehman is correct that you can't override validation rule execution order during Lead conversion. But there's a cleaner architectural solution he didn't mention: 

     

    The Best Practice: Consolidate into One Validation Rule

    Instead of separate rules for Country and State, merge them into a single validation rule that catches all missing address fields and returns one error message:

    AND(    ISPICKVAL(RecordType.Name, "Your Record Type"),    OR(        ISBLANK(BillingCountry),        ISBLANK(BillingState)    ))

    Error message:

    "Billing Country and State are required for Territory assignment. Please complete both fields before saving."

    One rule = one error = clean UX during Lead conversion. 

     

    Prevent at Lead Level (Cleanest Long-Term Fix)

    Add validation on the Lead object itself before conversion is even attempted:

    AND(    ISBLANK(Country),    ISBLANK(State))

    Error: "Country and State are required before converting this Lead."

    This stops the user at the Lead record — before conversion triggers Account validation entirely. 

     

    For Territory Model specifically:

     This is actually the recommended Salesforce pattern — enforce address completeness at the Lead stage so Territory assignment on the resulting Account never fails downstream. 

     

    Your Flow-based approach was architecturally sound but Lead conversion's execution order makes it unwinnable — the validation rule always fires first on the target object. 

     

    If this helps, please mark as Best Answer!

0/9000