Questions tagged [lead-conversion]

When you convert a lead, Salesforce creates a new account, contact, and, optionally, an opportunity using the information from the lead. Any campaign members are moved to the new contact and the lead becomes read only.

Filter by
Sorted by
Tagged with
51
votes
3answers
17k views

Lead Conversion Trigger Order of Execution

I've got a project where I'm looking to tweak the standard lead conversion process. Triggers and lead conversion has always been funky in past projects so I was hoping to start the design off by ...
13
votes
2answers
37k views

What Happens When A Lead Is Converted?

I'm new to SalesForce. What happens when the Convert button on the Lead Details page is clicked? I've read that The lead is marked as 'closed'. An Account object is created. An Opportunity tied to ...
11
votes
1answer
926 views

Access Lead conversion field mappings from Apex?

I've written some Apex code to override the lead conversion process. if the contact exists, the client wants to update all the contact fields with the lead field data when the lead field is not null. ...
11
votes
1answer
2k views

RECORD_IN_USE_BY_WORKFLOW, Unable to convert lead that is in use by workflow: []

In my Apex class i am converting leads. When i test my code through UI it is working fine but when i run my test class it get failed and shows this error: 22:21:47.413 (413465000)|FATAL_ERROR|...
10
votes
3answers
3k views

Can I Edit any data on a converted lead?

We have some reports that look at opptys and accounts. Some, rely on the information that the lead had while it was a lead. After some changes to the lead we use today, We need to edit data, within ...
10
votes
1answer
2k views

Multiple Contacts Per Lead - Possible?

I need to find out if there is a way to have multiple people associated to a single lead. For instance, say your company interacts and sells to other businesses. For this scenario, say the sales team ...
9
votes
1answer
520 views

Too many namespaces error

Once in awhile when I try to convert a lead, I get the following error: Error: System.LimitException: Too many namespaces accessed: 10 External entry point It happens pretty infrequently and I can'...
9
votes
2answers
1k views

Lead Converted Status

I have some problem, and I hope someone will be able to advice me with that. Organisation have multiple recordTypes, BusinessProcess and Converted statuses for Lead. Did anyone know is it possible to ...
8
votes
1answer
1k views

Test class showing error : Converted Account empty for a Converted Lead.: [ConvertedAccountId]

I need to write as test class to cover public without sharing class CMassConvert { public boolean hasErrors; public String errorMsg {get; set;} //constructora public CMassConvert() {}...
7
votes
1answer
5k views

Mass Lead Conversion - Programmatically or Using Data Loader

Is there a way to mass convert leads into accounts and contacts using data loader? I believe that Partner API exposes a method that we can call to mass convert leads. Is there a way in Apex (using a ...
6
votes
3answers
3k views

How can I determine whether a lead conversion was a merge to an existing contact or a new contact?

Looking around the net it appears that the best place to hook into the Lead Conversion process is in a Trigger's After Update event. I have a situation where I have a related object on a lead and ...
6
votes
3answers
1k views

Create already converted lead

Is there a way to insert/load a converted lead? I have tried creating one in apex, but got some errors. Attempt 1: Lead l = new Lead(); l.isConverted = true; insert l; Result: System....
5
votes
3answers
4k views

Is there a way to determine how certain account has been created?

As you know Salesforce accounts could be created either as a result of lead conversion or directly, by creating a new account using account creation form (and, accordingly, bypassing lead creation ...
5
votes
2answers
658 views

Best approach for integrating Converted Leadswith External Ids

Whats the best process for converting leads with external ids? I have an integration where I need to convert leads. The conversion needs to happen on an external id. I can't pass in the Salesforce ...
5
votes
1answer
422 views

How to get web-2-lead description text to activity?

Salesforce is very good and consistent in logging all kind of communication with users from lead to paying customer. It is great to see all activities, be they mails, call logs or meeting notes. ...
5
votes
1answer
297 views

Does opt_allOrNone guard against partial lead conversions?

There is a brief note at http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dml_convertLead.htm about opt_allOrNone preventing partial success of the convertLead DML operation: The ...
4
votes
3answers
979 views

Delete chatter post on Account after Lead gets converted

When we convert the lead automatic chatter feed appears on Account. UserName converted a lead to this account.I have chatter feed enabled on Lead and Account.Is there an option to prevent this post ...
4
votes
1answer
2k views

How to convert a lead owned by queue?

I am getting an issue: REQUIRED_FIELD_MISSING, Converted objects can only be owned by users. If the lead is not owned by a user, you must specify a user for the Owner field.: [OwnerId] while ...
4
votes
1answer
1k views

Change Lead status when matching Contact is created

I'm looking to write an Apex script, but I literally know nothing about programming in Salesforce (with the exception of what I've read in the last hour). I want to write a script that does the ...
4
votes
2answers
948 views

Is there a way to hide/disable standard Salesforce button clicked

Is there a way to stop standard Salesforce button being clicked? in the Lead page I have a standard button called "Convert" I want the user to stop clicking until the Lead is in certain stage, I'm ...
4
votes
2answers
3k views

Custom Objects Related to Lead associate to Account/Contact/Opp during Lead Conversion

We have several custom objects that can be related to Leads and that should end up related to the resulting Account/Contact/Opp during Lead Conversion. These Objects have multiple Lookup fields on ...
4
votes
1answer
869 views

How to convert leads without setting opportunity to closed won?

Whenever I convert Leads, and create an Opportunity on the go, all these Opportunities get the status Closed Won. I could not find where to change that, as it's obviously nonsense. How to change that?...
4
votes
1answer
366 views

Clearing out Converted lead fields after conversion

We have a bunch of custom fields on a lead which are required to be copied to the contact when a conversion takes place. We want to clear these fields after the conversion, as they contain sensitive ...
4
votes
1answer
1k views

Lead Conversion to Opportunity

I need to convert Leads into just an Opportunity because for various reasons the Account and Contacts for the Lead record will have been created separately. From the convertLead() docs is seems that ...
4
votes
1answer
3k views

Lead Status conversion

We are currently implementing a new marketing automation tool and one of the requirements is to copy the Lead "Lead Status" field to a custom Contact "Lead Status" field upon lead conversion. ...
4
votes
1answer
2k views

SOQL Contact to Lead Query Help

Quick Information: Using SOQL via the Enterprise SOAP API This is a .NET 4.5 application, C# This is in my Salesforce sandbox I'm using Force.com Explorer I'm new to StackExchange AND Salesforce. Be ...
4
votes
1answer
4k views

Database.convertLead() creates Account, Contact and Opportunity but leaves Web-to-Lead Lead unconverted

I've written a trigger to auto convert leads coming in from a web form. When I send the information from the web form, the Lead is created, the trigger runs the Database.convertLead and I get an ...
4
votes
0answers
153 views

Deleted contact's ID is not removed from converted lead. Why?

We have a requirement to delete all converted leads whose corresponding contacts have been deleted. Upon implementation we noticed something odd: After creating and converting a lead via UI (classic ...
3
votes
3answers
149 views

Move Lead History tracking section data to account on lead conversion?

Is there any way I can transfer Lead History tracking section data to the Account record when that lead gets converted to an account?
3
votes
1answer
2k views

how to create a opportunity converted from lead in test class

I am writing a test class and need to create test data on an opportunity converted from a lead. I can create a lead in test class Lead testLead = new Lead(); testLead.FirstName = 'Test First'; ...
3
votes
2answers
2k views

How to view converted Lead info?

This should be easy but I can not find out how to view converted Lead info. I read that the Lead becomes view-only, but that it is not viewable in a Leads view. I also read that there is a report ...
3
votes
1answer
411 views

import converted lead with depending objects (meetings, calls, emails, notes)

I am trying to import a converted lead using REST/SOAP API-s. While I am able to create already converted lead, I am not able to attach all its depending object like notes, meetings etc because lead ...
3
votes
1answer
587 views

Does a timebased workflow remain in queue after the criteria has become false?

I do have a time based workflow set on leads and when we try to convert them it throws an error RECORD_IN_USE_BY_WORKFLOW, Unable to convert lead that is in use by workflow: To overcome this i ...
3
votes
1answer
288 views

Setting Default owner while converting lead …If Lead is owned by a queue

I have a process builder in my org which checks if (fieldA = 'XYZ') and then invokes a AutoLeadConversion class (code below). Public class AutoConvertLeads { @InvocableMethod public static ...
3
votes
2answers
1k views

How to convert all my Leads to Contacts

How can I convert all my leads to contacts without creating new opportunity? Can somebody give me some example? Thanks in advance.
3
votes
1answer
3k views

Can i get the Lead ID once it has already been converted?

My BI colleague asked me to put if I can 2 new fields on account, both related with the lead that this account was before conversion. One is the Creation Date and the other is the ID of the lead. I ...
3
votes
1answer
1k views

How do we convert a Lead into person accounts in apex?

How can i convert a lead to person accounts using apex? I have done lead conversion which would convert a lead to standard account, contact and opportunity by mostly referring https://www.salesforce....
3
votes
2answers
5k views

How to convert a Lead to Contact automatically?

I'm looking for help. I'm new to Salesforce, learning to become an Admin. We are developing a Web to Lead form. We'd like to automatically change anyone who submits the WTL form directly to a ...
3
votes
2answers
2k views

Populate Lookup field on Opportunity upon Lead Conversion

I am trying to populate a Contact lookup field (Sourced_By__c) on the Opportunity with the Converted Contact upon Lead Conversion but am not having any luck. I do not get an error but it also does not ...
3
votes
1answer
234 views

Any way to convert leads in apex without using the convertLead() method?

The customer's spec requires some standard fields on leads to be mapped to custom fields and vice versa. I've been trying to override the lead conversion behaviour by writing an apex class. Mapping ...
3
votes
1answer
202 views

update description from lead to existing contact

When a Lead is converted, the "Description" of the lead is going to the "Description" of the newly created contact. If I convert a Lead into an existing contact, then the "Description" of the lead ...
3
votes
1answer
35 views

LeadConvert getAccountId() isn't working as expected, returns nothing

I'm trying to change the record type of a newly created account following lead conversion. The documentation states that: getAccountId() - Gets the ID of the account into which the lead will be ...
3
votes
1answer
744 views

How to convert Related list of Lead to Accounts?

We have Custom object 'XXX' as a related list in Lead, during conversion of Lead to Account,the related lists of lead is not being carried to the account and also the related list records of lead is ...
3
votes
3answers
295 views

Validation Rules on Conversion

I'm trying to ensure that there is atleast some activity on a lead before it is converted. I've tried setting a validation rule ISCONVERTED && ISBLANK(LASTACTIVITYDATE) but it returns as a ...
3
votes
1answer
1k views

Lead insert trigger not running after web2lead

I have a trigger on Leads like this: trigger LeadTrigger on Lead (after insert, after update) { // I only see the following line in the logs when I manually insert a new lead system.debug('**...
3
votes
1answer
603 views

Leadsource not mapped to accountsource upon conversion

When we convert a lead, it's LeadSource is NOT been shown in the AccountSource. The one error I see, is that in the Lead Custom Field Mapping The field is not mapped But I don't have the field: ...
3
votes
1answer
2k views

how to convert lead to PersonAccount using apex

I am converting a Lead to Person Account using Apex but it is throwing the exception as given below: ConvertLead failed. First exception on row 0; first error: UNAVAILABLE_RECORDTYPE_EXCEPTION, ...
3
votes
1answer
444 views

Lead Conversion- sometimes merges with existing contact and sometimes doesn't..why?

Sometimes when my users are converting leads, after they click "Convert", it will bring up another screen asking if we want to merge the lead with an existing contact. This is not consistent and ...
3
votes
1answer
686 views

Disabling account and contact triggers on NPSP 3.0

We are using Non profit starter pack 3.0 in a fresh new sandbox. We have a requirement to automatically convert leads to accounts, contacts and opportunities. Since we are using the NPSP 3.0 1 to 1 ...
3
votes
1answer
4k views

Testing Custom Lead Conversion Trigger

I'm having some trouble setting up a testing class for a trigger that i wrote to populate a custom object with fields of a lead on lead conversion, in addition to the standard (Account, Contact, ...