populate_list - Relationship

Hi all.

I'm looking to simply use populate_list to pull a relationship from Leads into Opportunities. I've created what I thought was the correct simple file of:

<?php
$dictionary["Lead"]["fields"]["opportunity"]['populate_list'] = [
		'contacts_leads_1_name' => 'contacts_opportunities_1_name',
];

However this has failed to work, I've put this file here - custom/Extension/modules/Leads/Ext/Vardefs

Simply it should pull the Contact through to the Opp in the custom relationship. Have I missed anything obvious?

Thanks,

Daniel

Parents
  • populate_list works only on:

    1. creating child record from subpanel under parent module: populate_list must be placed in the field 'link' of the parent module which relates to child module.
    2. creating child record directaly from create view and choose parent record in the respective relate field: populate_list must be placed in the field 'link_name' of the child module which relates to a parent module.

    According to your code, it seems you are trying to create an Opportunity from subpanel under Leads. Is that the real scenario?

    Anyway, you are missing the field 'link_id' in the populate_list definition.

    Additional tip: populate_list doesn't work on selecting from existing records.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hi Andre.

    Apologies I've had some time off. I am trying to get this to work on conversion of a lead rather than any subpanels. So I convert the lead, as part of the conversion I create an opportunity, but on the lead I have a custom relationship to contacts, I want to pull that custom relationship link onto a separate custom relationship on Opportunities. 

    Hopefully that makes sense, I tried the link_name but had no luck as the link isn't the same across the two modules.

    - Hopefully this helps explain it for yourself as well?

    Thanks!

    Daniel

Reply
  • Hi Andre.

    Apologies I've had some time off. I am trying to get this to work on conversion of a lead rather than any subpanels. So I convert the lead, as part of the conversion I create an opportunity, but on the lead I have a custom relationship to contacts, I want to pull that custom relationship link onto a separate custom relationship on Opportunities. 

    Hopefully that makes sense, I tried the link_name but had no luck as the link isn't the same across the two modules.

    - Hopefully this helps explain it for yourself as well?

    Thanks!

    Daniel

Children