Enforce Opportunity Creation or Lead Source on Lead Conversion

I had an interesting request from one of my clients today, and I thought the solution would be a great quick blog post for other Salesforce Administrators. The request was to enforce Users to create an Opportunity during the Lead Conversion process (for marketing reporting).

You can accomplish this with a Lead Validation Rule. Remember that when you write a Validation Rule, when the logic holds TRUE, you can block the record from being saved and display an error message.

The syntax for our Validation Rule is as follows:

AND(IsConverted=true, ConvertedOpportunityId="")

Broken down, for the Validation Rule to work both of the following conditions must be true:

IsConverted=true – which checks to see if the Lead is being converted


Converted OpportunityID="" – which checks to see if an Opportunity was created

Here is a screenshot of how to setup the Validation Rule on Leads:

Lead Validation Rule

And here is the result when the Validation Rule blocks the Lead record during the conversion step:

Lead Blocked and Error Message

Here is another example you might find useful. This Validation Rule on Leads makes Lead Source required before being converted (again, Validation Rules must result in TRUE to fire). Here is the syntax:

AND(IsConverted, ISBLANK(TEXT(LeadSource)))

That’s it! A nice little tip to enforce data quality and compliance.

This entry was posted in Administration. Bookmark the permalink.