Timesaver #7 – Forcing Opportunities During Lead Conversion

A couple of days ago, a good friend and fellow MVP, Becka who is also known as @SFDC_Nerd, put out a tweet using the AskForce hashtag. It was as follows:

“Any way to have a trigger fire before lead convert? Trying to force oppty creation on all leads. #askforce (yeah, I’m back to this again)”. Now, a few things on this tweet – first, I gathered from the tweet that she had been working on this issue for some time, and I had likely missed the first call for help due to an extremely noisy twitter stream. Secondly, I had a time saving validation rule for that.

To ensure that users HAVE to create an opportunity when converting a lead, you need to add a validation rule. The rule is as follows:

AND(IsConverted=true, ConvertedOpportunityId=””, ISPICKVAL(Status, “Qualified”))

What this validation does is check to see if the lead is being converted (IsConverted=true), there is no opportunity created (ConvertedOpportunityId=””) and that the status is set to qualified (the standard status for converted leads). As a converted lead without an opportunity would meet this requirement, and the rule would be equal to true (all three requirements are met), the the validation would kick in, and you would not be able to convert. I would highly recommend setting the error to the top of the page, and adding in a error message stating that an opportunity is required to convert.

3 Comments

Aiden 16 September 2011 Reply

Nice.

Becka 19 September 2011 Reply

Again, can’t thank you enough for this!

Leave a Reply

Are You Smarter Than A Spambot? *