function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ErocEroc 

How can I create a rule to automatically check "Do not create new opportunity"

When converting a Lead, is there a way to setup a rule to automatically check the box "Do not create a new opportunity upon conversion"?

 

Thanks,

E

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

I can't take credit for this, it was posted on the IdeaExchange a while back (a big shout out to "coppel@spscommerce.com" for originally posting it).

 

 

To automatically select the "Do not create a new opportunity upon conversion" checkbox on the lead conversion screen, create a custom button and use that button instead of the standard convert button on the Lead page layout. To do this follow these steps:



1. Click on Setup | Customize | Leads | Buttons and Links

2. In the "Custom Buttons and Links" section, click on "New"

3. Assign a name and label to that button. It would be best to have the label set to "Convert"

4. Choose "Detail Page Button" in the "Display Type" field

5. Choose "Display in existing window without sidebar or header" in the "Behavior" field

6. Choose "URL" in the "Content Source" field

7. In the code section type the following: "/lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1"



Now simply remove the standard "Convert" button and add this new button on the lead page layouts in the Detail Buttons Section where you would like this to take effect.

 

Message Edited by Stevemo on 02-25-2009 01:07 AM

All Answers

Steve :-/Steve :-/

I can't take credit for this, it was posted on the IdeaExchange a while back (a big shout out to "coppel@spscommerce.com" for originally posting it).

 

 

To automatically select the "Do not create a new opportunity upon conversion" checkbox on the lead conversion screen, create a custom button and use that button instead of the standard convert button on the Lead page layout. To do this follow these steps:



1. Click on Setup | Customize | Leads | Buttons and Links

2. In the "Custom Buttons and Links" section, click on "New"

3. Assign a name and label to that button. It would be best to have the label set to "Convert"

4. Choose "Detail Page Button" in the "Display Type" field

5. Choose "Display in existing window without sidebar or header" in the "Behavior" field

6. Choose "URL" in the "Content Source" field

7. In the code section type the following: "/lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1"



Now simply remove the standard "Convert" button and add this new button on the lead page layouts in the Detail Buttons Section where you would like this to take effect.

 

Message Edited by Stevemo on 02-25-2009 01:07 AM
This was selected as the best answer
JakesterJakester
SWEET! My boss just asked me for a way to do this about a week ago. Thank you!!!
CRMGeneralistCRMGeneralist
 LOVE IT, JUST TESTED, PERFECT... THANKS.
ElinaPElinaP
this works if a lead is converted without looking for duplicates. What if the user frst clicks "find duplicates" button and then clicks on convert button from that screen? Is it possible to modify that convert button to check off do not create opportunity?
Steve :-/Steve :-/

Okay, no guarantees but you can try this (and if it works you owe me a beer).  

 

Enable "Enforce Validation and Triggers from Lead Convert" on the Lead Conversion Settings.  

Create a custom field on the Lead object.

Datatype(Number,0)

Default Value: 1

Field Level Security: Read-Only

 

Create a custom field on the Opportunity object.

Datatype(Number,0)

Default Value: 0

Field Level Security: Read-Only

 

Create an Opportunity Validation Rule

Formula:

 

No_Lead_Opportunity__c > 0

In theory the user should get an error message if they try to convert a Lead without checking the "No opportunity" checkbox (no matter what Convert button they use).  

 

 

Anyway, lemme know how you make out.

 

Cheers

 

 

 

ElinaPElinaP

Thank you for the solution! Unfortunately this will not work for us as we have a lot of validation rules on the account and opportunity objects.  So what i was looking for is to be able to override the Convert button that appears on Find Duplicates page layout.

 

 

Steve :-/Steve :-/

Why would it not work because of the other Opportunity VR's? 

If that won't work, then the only other thing that I can suggest is creating a custom Page using Visualforce that has a custom button with the Convert No Opportunity code behind it.  But the only thing that I know about Visualforce is that I don't know a thing about Visualforce.

ElinaPElinaP

It is mostly account validation rules. I am a little familiar with VF so will try that.

 

Thanks!