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
NTRAHEYNTRAHEY 

Convert lead to a custom object

In addition to accounts, contacts, and opportunities, I'd like to be able to convert leads to a custom object (Programs).  I am not a developer am not technically savvy enough to create a Visualforce page or S-control to do this. If someone has done this and can share the code/formula with me, I'd appreciate it. 

NasipuriNasipuri
Hi , For doing something like this , you need to develop some piece of Apex Trigger using Apex Code. I don't think any configuration (declarative) component will do similar thing. Thanks and Regards,Dinesh Nasipuri

Dinesh.Nasipuri@gmail.com

jkucerajkucera

At the high level, converting a lead creates 3 objects.  It sounds like you want to click a button & create a record in Programs, transfering over some of the Lead information.

 

To do this, check out the boards for examples of how to create new records in other objects.  Skeleton for the trigger might be something like:

 

trigger on Leads (before update){

   for (Lead l: trigger.new){

      if (Leads.CustomConvert__c==True){

         Programs__c p=new Program__c(Name=l.firstname, OtherField__c=l.OtherValue...);

         l.ConvertedToProgram__c=true;

      }

   }

}

 

I don't believe you can set l.IsConverted=True without assigning an Account and an Opportunity, so you probably want a custom field to say whether the lead has been converted such as my above example l.ConvertedToProgram__c.

 

If you don't have developer skills, you'll want to outsource this to either SFDC professional services or another SFDC developer.

 

dekkerbobbydekkerbobby
Use the free app Object Converter. Good app that would take care of most of your converting questions. https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003JeOiEAK
Dima Ivanov 17Dima Ivanov 17

NTRAHEY,

If you want to convert Lead to custom object (Programs) with no code, please try appexchange app Blink: Mass & Auto Convert Leads, Lead to Custom Object (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G0nBzUAJ)