Pulling Parent Fields via Populate List

Hi all.

I am trying to use the vardef (populate_list) to pull fields in on the subpanel create. I have this working for Contacts by doing something simple such as:

Fullscreen
1
$dictionary['Contact']['fields']['account_name']['populate_list']['description'] = 'description';
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

However when trying to do the same for a parent field (flex relate), I can't seem to pull it in. Even when using the actual link itself, for example:

Fullscreen
1
$dictionary['Calls']['fields']['calls_leads']['populate_list']['description'] = 'description';
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I spotted the article from (https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/introducing-populate_5f00_list-in-parent-fields) however when trying to implement it, nothing seems to be pulling, I've tried the following:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$dictionary["Calls"]["fields"]["parent_name"]['auto_populate'] = true;
$dictionary["Calls"]["fields"]["parent_name"]['parent_populate_list'] = [
'Leads' => [
'description' => 'description',
]
];
$dictionary["Calls"]["fields"]["calls_leads"]['auto_populate'] = true;
$dictionary["Calls"]["fields"]["calls_leads"]['parent_populate_list'] = [
'Leads' => [
'description' => 'description',
]
];
$dictionary["Calls"]["fields"]["calls_leads"]['auto_populate'] = true;
$dictionary["Calls"]["fields"]["calls_leads"]['parent_populate_list'] = [
'leads' => [
'description' => 'description',
]
];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I feel I am missing something super obvious, so if anyone can help I'd really appreciate it!

Thank you,

Daniel

Parents
  • Did you try

    Fullscreen
    1
    2
    3
    4
    $dictionary["Call"]["fields"]["parent_name"]['auto_populate'] = true;
    $dictionary["Call"]["fields"]["parent_name"]['populate_list'] = [
    'description' => 'description',
    ];
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    The two issues I see

    1) Use "Call" instead of "Calls"

    2) Use "populate_list" instead of "parent_populate_list"

  • Hi John. Rookie mistake on the first one! Just changed my tests to that but still no luck, the "parent_populate_list" was a new .js file in that article.

    Using the populate_list it still doesn't seem to be working, I've tried this now:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    $dictionary["Call"]["fields"]["calls_leads"]['auto_populate'] = true;
    $dictionary['Call']['fields']['calls_leads']['populate_list']['description'] = 'description';
    $dictionary["Call"]["fields"]["parent_name"]['auto_populate'] = true;
    $dictionary["Call"]["fields"]["parent_name"]['populate_list'] = [
    'description' => 'description',
    ];
    $dictionary["Call"]["fields"]["calls_leads"]['auto_populate'] = true;
    $dictionary["Call"]["fields"]["calls_leads"]['populate_list'] = [
    'description' => 'description',
    ];
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Reply
  • Hi John. Rookie mistake on the first one! Just changed my tests to that but still no luck, the "parent_populate_list" was a new .js file in that article.

    Using the populate_list it still doesn't seem to be working, I've tried this now:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    $dictionary["Call"]["fields"]["calls_leads"]['auto_populate'] = true;
    $dictionary['Call']['fields']['calls_leads']['populate_list']['description'] = 'description';
    $dictionary["Call"]["fields"]["parent_name"]['auto_populate'] = true;
    $dictionary["Call"]["fields"]["parent_name"]['populate_list'] = [
    'description' => 'description',
    ];
    $dictionary["Call"]["fields"]["calls_leads"]['auto_populate'] = true;
    $dictionary["Call"]["fields"]["calls_leads"]['populate_list'] = [
    'description' => 'description',
    ];
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Children
No Data