Scenario
In “Account” you have the field named “industry” but this field doesn’exist in entity “Lead”. You need to have thi field also in the “lead” and this field must be converted in the corresponding field in the new Account entity.
Create Custom Field
In “Studio” search for Account entity and select “fields” folder. Search for the “industry” field. As you can see, this field is a dropdown field linked to “industry_dom” field.
Move yourself to “Lead” entity in fields folder : create a new field named, for example, mec_lead_industry_c. You need to link this field to the “industry_dom” field, so you will have in Account and Lead the same data in the drop down.
Now you have to do a customization of Lead’s forms to see the new field. So you will be able to set this information for your Lead. The problem is that, when you will convert this lead in a new acount , you will not see the related informaztion about “industry” (in account entity).
Map Custom field between Lead and Account
Create a Copy of /modules/Leads/views/view.convertlead.php in custom/modules/Leads/views/
Edit your copy
Search for this code :
if ($module == 'Contacts') {
$beans[$module]->id = create_guid();
$beans[$module]->new_with_id = true;
$beans[$module]->account_id = '';
}
After this code you have to add, in our example, this code to automatically map the two fields in transformation.
if ($module == 'Accounts')
{
$beans[$module]->industry = $lead->mec_lead_industry_c;
}
SOME USEFULL FIELDS
Entity |
Description |
Name |
dropodwon field |
Account |
Type |
account_type |
account_type_dom |
Account |
Industry |
industry |
industry_dom |
Lead |
lead_source |
lead_source |
lead_source_dom |
Contact |
lead_source |
lead_source |
lead_source_dom |