You need to sign in to do that
Don't have an account?
Convert lead through apex but should not create account
hi
i want convert a lead from apex without creation of account
how is it possible?
public class LeadClass{ public static void doConvert(Id leadId){ Database.LeadConvert lc = new database.LeadConvert(); lc.setLeadId(leadId); lc.setDoNotCreateOpportunity(True); //**IMPORTANT METHOD HERE** LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1]; lc.setConvertedStatus(convertStatus.MasterLabel); Database.LeadConvertResult lcr = Database.convertLead(lc); } }

No, you can't convert a lead without creating an account or attaching to an existing account. Many clients that have this need opt for Person Accounts, or, if they do not use that feature, have a dummy account that all "non-account contacts" are assigned to. Not assigning a contact to an account has a negative effect on sharing permissions.