How to populate fields in Contacts and Opportunities during Lead Conversion?

Hello All,

I am customizing SugarCRM 7.2.0. I have requirement while convert the Lead. Need to fill some dropdown fields on the Contacts and Opportunities. Has anybody try out this thing for Lead Convert ?

Thanks.
Parents
  • You can do this by editing the 'convert-main.php' file. Copy that file from /modules/Leads/clients/base/layouts/convert-main/convert-main/php to /custom/modules/Leads/clients/base/layouts/convert-main/convert-main/php.

    When that's done, you can change the fieldmappings.

    In the example below, I map my phone_work from my lead, to my phone_office in opportunities.

    array(
        'module' => 'Opportunities',
        'required' => false,
        'copyData' => true,
        'duplicateCheckOnStart' => true,
        'duplicateCheckRequiredFields' =>
            array(
                'account_id',
            ),
        'fieldMapping' =>
            array(
                'name' => 'last_name',
                'phone_work' => 'phone_office',
            ),
        'dependentModules' =>
            array(
                'Accounts' =>
                    array(
                        'fieldMapping' =>
                            array(
                                'account_id' => 'id',
                            ),
                    ),
            ),
        'hiddenFields' =>
            array(
                'account_name' => 'Accounts',
            ),
    ),


Reply
  • You can do this by editing the 'convert-main.php' file. Copy that file from /modules/Leads/clients/base/layouts/convert-main/convert-main/php to /custom/modules/Leads/clients/base/layouts/convert-main/convert-main/php.

    When that's done, you can change the fieldmappings.

    In the example below, I map my phone_work from my lead, to my phone_office in opportunities.

    array(
        'module' => 'Opportunities',
        'required' => false,
        'copyData' => true,
        'duplicateCheckOnStart' => true,
        'duplicateCheckRequiredFields' =>
            array(
                'account_id',
            ),
        'fieldMapping' =>
            array(
                'name' => 'last_name',
                'phone_work' => 'phone_office',
            ),
        'dependentModules' =>
            array(
                'Accounts' =>
                    array(
                        'fieldMapping' =>
                            array(
                                'account_id' => 'id',
                            ),
                    ),
            ),
        'hiddenFields' =>
            array(
                'account_name' => 'Accounts',
            ),
    ),


Children
No Data