Populating a field when choosing a relate field _ suite crm
<p>i'm using suite crm 7.7.5</p>

<p>when i create an opportunity and i choose an account from a relate field, i want a field (country) to be auto populated with the value of the country of the account chosen. </p>

<p>for this, i tried to add the code </p>

<pre><code>    $dictionary['Opportunity']['fields']['country_c']['populate_list']= array('id','name','country_c');
$dictionary['Opportunity']['fields']['country_c']['field_list'] = array('account_id_c','account_name','country_c');
</code></pre>

<p>in the file \custom\Extension\modules\Opportunities\Ext\Vardefs\sugarfield_country_c.php</p>

<p>knowing that country_c is the name of the column country in the table accounts and  the second country_c  is the id of the field country in the layout opportunity </p>

<p>but that doesn't work, could someone help me to figure out the reason?</p>

<p>PS : i've tried to follow this tutorial <a href="https://developer.sugarcrm.com/2011/08/31/howto-using-a-relate-field-to-populate-a-custom-field/" rel="nofollow noreferrer">https://developer.sugarcrm.com/2011/08/31/howto-using-a-relate-field-to-populate-a-custom-field/</a></p>