-1

I am using Standard Lead Conversion Process. I have updated the Lead to Opportunity Field Mapping on the Lead in the "Map Lead Fields" Section

When I convert a Lead into a New Opportunity, the Lead fields are mapped correctly, but when I choose to link an Existing Opportunity, the Lead data is not Mapped to the Opportunity

Please Assist!

Thanks, Craig

2

1 Answer 1

0

As you mentioned you are not able to overwrite the data of the lead record into the existing opportunity record.

As per the article Considerations for Converting Leads

When updating existing accounts or contacts during lead conversion, the values of mapped lead fields don’t overwrite the values of the mapped account and contact fields.

This is also applicable for Opportunity objects during lead conversion.

Although we may use custom code to convert leads into existing accounts and contacts, the value is not replaced when the lead is converted.

String leadId = '00XXXXXXXX';
Database.LeadConvert lc = new database.LeadConvert();
lc.setLeadId(leadId);
lc.setAccountId('001XXXXXXXX');
lc.setOpportunityId('006XXXXXXXX');
lc.setConvertedStatus('Closed - Converted');
Database.LeadConvertResult lcr = Database.convertLead(lc);

convert lead using apex code

The system automatically maps standard lead fields to the standard account, contact, and opportunity fields.

For custom lead fields, your administrator can specify how they map to custom account, contact, and opportunity fields using Map Lead Field

1
  • Thanks Harsh! I guess you didnt understand my problem. I am aware of the Account existence rule. My problem is I have a Lead which is ready to be converted. I have an existing Account and Opportunity as well in Salesforce. I wanted to convert the Lead and link it to the existing Account and and Opportunity. When I select the respective Account and Opportunity, the Lead data is not being copied over to the existing Opportunity. Do I need to make any changes (somewhere in setup) or I would need some custom logic for this
    – Craig Lobo
    Commented Sep 12, 2023 at 8:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .