AnsweredAssumed Answered

Lead Conversion, copy newly created Account to custom module

Question asked by Francesca Shiekh on Nov 28, 2017
Latest reply on Dec 26, 2017 by Rolustech Support

I have a custom module in Lead Conversion which is related to the Accounts module.

When a new Account is created during the Lead conversion the Account is not copied over, however, this works for an Opportunity created during the conversion.

I have followed the "template" in the convert-main layout for Opportunities to attempt to map the Account for the custom moduel but it's not working in 7.8.2 or 7.9.2

 

in custom/custom/modules/Leads/clients/base/layouts/convert-main/convert-main.php

            array (
              'module' => 'pgopp_PartnershipOpportunities',
              'required' => false,
              'copyData' => true,
              'duplicateCheckOnStart' => true,
              'fieldMapping' =>
              array (
                'affiliation' => 'affiliation_c',
              ),
              'dependentModules' =>
              array (
                'Accounts' =>
                array (
                  'fieldMapping' =>
                  array (
                    'accounts_pgopp_partnershipopportunities_1accounts_ida' => 'id',
                  ),
                ),
              ),
              'hiddenFields' =>
              array (
                'accounts_pgopp_partnershipopportunities_1_name' => 'Accounts',
              ),
            ),
          ),

The names used in the field mapping are from the definition of the relationship between Accounts and the custom module. From the pgopp_PartnershipOpportunities vardefs:

    'accounts_pgopp_partnershipopportunities_1' =>
    array (
      'name' => 'accounts_pgopp_partnershipopportunities_1',
      'type' => 'link',
      'relationship' => 'accounts_pgopp_partnershipopportunities_1',
      'source' => 'non-db',
      'module' => 'Accounts',
      'bean_name' => 'Account',
      'side' => 'right',
      'vname' => 'LBL_ACCOUNTS_PGOPP_PARTNERSHIPOPPORTUNITIES_1_FROM_PGOPP_PARTNERSHIPOPPORTUNITIES_TITLE',
      'id_name' => 'accounts_pgopp_partnershipopportunities_1accounts_ida',
      'link-type' => 'one',
    ),
    'accounts_pgopp_partnershipopportunities_1_name' =>
    array (
      'name' => 'accounts_pgopp_partnershipopportunities_1_name',
      'type' => 'relate',
      'source' => 'non-db',
      'vname' => 'LBL_ACCOUNTS_PGOPP_PARTNERSHIPOPPORTUNITIES_1_FROM_ACCOUNTS_TITLE',
      'save' => true,
      'id_name' => 'accounts_pgopp_partnershipopportunities_1accounts_ida',
      'link' => 'accounts_pgopp_partnershipopportunities_1',
      'table' => 'accounts',
      'module' => 'Accounts',
      'rname' => 'name',
    ),
    'accounts_pgopp_partnershipopportunities_1accounts_ida' =>
    array (
      'name' => 'accounts_pgopp_partnershipopportunities_1accounts_ida',
      'type' => 'id',
      'source' => 'non-db',
      'vname' => 'LBL_ACCOUNTS_PGOPP_PARTNERSHIPOPPORTUNITIES_1_FROM_PGOPP_PARTNERSHIPOPPORTUNITIES_TITLE_ID',
      'id_name' => 'accounts_pgopp_partnershipopportunities_1accounts_ida',
      'link' => 'accounts_pgopp_partnershipopportunities_1',
      'table' => 'accounts',
      'module' => 'Accounts',
      'rname' => 'id',
      'reportable' => false,
      'side' => 'right',
      'massupdate' => false,
      'duplicate_merge' => 'disabled',
      'hideacl' => true,
    ),

 

The Account is mapped correctly when an existing account is selected but not when a new Account is created in the Lead Conversion process.

 

Any thoughts on what I'm doing wrong?

thanks,
FrancescaS

Outcomes