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
nil_von_9wonil_von_9wo 

Is it possible to Map Lead Conversion? Or create a custom convert function?

My client has two record types ("Label Clients" and "Project Clients") for each of the standard sObjects "Leads", "Accounts", and "Objects".

 

As should seem obvious, when my client converts a Lead, the resulting Accounts and Opportunities *should* be of the corresponding type.

 

However, in practice, all conversions results in conversions to "Label Client" records.

 

"Map Lead Fields" doesn't seem to include "Record Type" as mappable.

 

Is there somewhere else I should look to map this?

 

Or can I create some sort of custom Convert using Apex?

 

Or, is the best solution to make a trigger which will change the record type based upon a picklist?  Would conversion be considered an "insert" or an "update"?

 

-Brian. 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
zen_njzen_nj

What you can do is use workflow to "after-the-fact" changed the record type of the Account or Opportunities.

 

So first you'll need to create a custom field that exists in Lead, Account, and Opportunity. Call it ActualRecordType or something like that and it can be a picklist with value of either "Label Clients" or "Project Clients&Quotes".

And you then only allow the value of "Label Clients" to exist in Lead with Record Type of "Label Clients" as well as make it the default value. Likewise for Project Clients&Quotes.

 

This way, whenever you create a Lead of Record Type "Label Clients", the ActualRecordType field value in that Lead would be "Label Clients".

 

On Account or Opportunity, you can just create the same field name with same picklist value, and then make sure the ActualRecordType field is one of the Map Lead Fields.

 

Then you would create workflow so that whenever an Account or Opportunity is created (which they would be when Lead is converted), if the ActualRecordType = Project Clients&Quotes, but the RecordType of the Account or Opportunity is Label Clients, then workflow will fire off which calls an field update rule - and that field update rule will just change the RecordType to Project Clients&Quotes.

 

 

So doing it this way you don't need to use triggers - but you will need to make sure to maintain/update ActualRecordType picklist field if you do create additional record type for Lead/Accounts/Opportunities later on.

All Answers

zen_njzen_nj

What you can do is use workflow to "after-the-fact" changed the record type of the Account or Opportunities.

 

So first you'll need to create a custom field that exists in Lead, Account, and Opportunity. Call it ActualRecordType or something like that and it can be a picklist with value of either "Label Clients" or "Project Clients&Quotes".

And you then only allow the value of "Label Clients" to exist in Lead with Record Type of "Label Clients" as well as make it the default value. Likewise for Project Clients&Quotes.

 

This way, whenever you create a Lead of Record Type "Label Clients", the ActualRecordType field value in that Lead would be "Label Clients".

 

On Account or Opportunity, you can just create the same field name with same picklist value, and then make sure the ActualRecordType field is one of the Map Lead Fields.

 

Then you would create workflow so that whenever an Account or Opportunity is created (which they would be when Lead is converted), if the ActualRecordType = Project Clients&Quotes, but the RecordType of the Account or Opportunity is Label Clients, then workflow will fire off which calls an field update rule - and that field update rule will just change the RecordType to Project Clients&Quotes.

 

 

So doing it this way you don't need to use triggers - but you will need to make sure to maintain/update ActualRecordType picklist field if you do create additional record type for Lead/Accounts/Opportunities later on.

This was selected as the best answer
GobotGobot

This process worked for me. This should be a standard function of salesforce.com  Thanks for sharing.