Search Community
- Force.com Discussion Boards
- :
- Salesforce User Discussions
- :
- Best Practices Discussion
- :
- Re: How Do You Automatically Convert Leads Based O...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How Do You Automatica lly Convert Leads Based On A Field Value?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-22-2009 08:18 AM
I'm sure I'm just not using the correct terminology, but I haven't been able to find an answer to the following:
I have a lead field that's a checkbox. If that box is checked, I want the lead to be automatically converted to an opportunity. How do I do that?
Thanks!!
Re: How Do You Automatica lly Convert Leads Based On A Field Value?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-27-2009 02:00 PM
Trigger is your best bet to auto-convert a lead when some value = True. Check out the Apex docs:
http://www.salesforce.com/us/developer/docs/apexc
Re: How Do You Automatica lly Convert Leads Based On A Field Value?
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-05-2009 04:44 PM - last edited on 11-05-2009 04:47 PM
jkucera is right. You are going to want to setup an after update lead trigger. That trigger will check every lead after it has been updated to see if the value is true. You will use a Database.LeadConvert instance and Database.convertLead method to convert your lead. Frankly the objects and methods to convert lead are still kind of confusing to me, i just took an example and made it work for me ![]()
There is an example in the reference docs:
http://www.salesforce.com/us/developer/docs/apexco

