Auto populate field problem

following the guide:

I’ve sucessfully autofill a relate field and populating my custom fileds however when the fields are filled in the parent relate field this error coming:

No match for field: My Custom Field

My Code:

Custom field in Leads relate to Contacts:

This is my vardefs

$dictionary[‘Lead’][‘fields’][‘dbgit_contactaccountdir_c’][‘populate_list’] = array(‘name’,‘salutation’,‘first_name’,‘last_name’,‘title’,‘department’,‘email1’,‘phone_work’,‘phone_mobile’,‘phone_fax’,‘dbgit_accountname_hidden_c’);
$dictionary[‘Lead’][‘fields’][‘dbgit_contactaccountdir_c’][‘field_list’] = array(‘name’,‘salutation’,‘first_name’,‘last_name’,‘title’,‘department’,‘dbgit_email1_c’,‘phone_work’,‘phone_mobile’,‘phone_fax’,‘account_name’);

So the contents in parent relate field is not recognized as valid

I need to understand one of this way to solve:

-> clear relate field once selected
-> fill the parent relate field with a coherent value.

See Attached image

Thank you

i have the same problem, could you please tell me how you did to overcome it ?

For every related field, there are two fields. One where you select a named value for the field and another one that is an ID field that is hidden. Look at the source of the page near that related field and see if the ID field is being populated.

1 Like

thanks for your response, i found in the navigator this code

and in custom\modules\Opportunities\metadata\editviewdefs.php i added this code

1 =>
array (
‘name’ => ‘account_name’,
‘displayParams’ => array (
‘field_to_name_array’ => array(
‘country_c’ => ‘populated_country_c’,

    1 => 
    array (
      0 => 
      array (
        'name' => 'populated_country_c',
        'label' => 'LBL_POPULATED_COUNTRY_C',

which id should i use?
i have id = account_name and the hidden id = account_id

When i use ‘id’=>‘account_id_c’ the auto population works fine, but i cannot save. When i use ‘id’=>‘account_id’ (hidden id) the autopopulation doesn’t work but i can save the new opportunity
Could someone suggest me a solution