auto fill a field (industry) from a relate field (account) in the editview (opportunity)

Hello,

i’m blocked since a while
when a user add an opportunity, he chooses an account (a relate field). Then he choose an industry from a dropdown list.
I want to make the field auto filled when the user choose the account.
I’ve been searching in the forum, i found many cases and i tried them but none of them worked for me, i need help!

This is the solution that i’m trying to make it works

In the folder …\custom\Extension\modules\Opportunities\Ext\Vardefs , i added a file vardefs.ext.php
on it i tried with those lines

<?php $dictionary['Opportunity']['fields']['account_id_c']['populate_list'] = array('name', 'id', 'industry'); $dictionary['Opportunity']['fields']['account_id_c']['field_list'] = array('account_name', 'account_id_c', 'industryGeneratedRelate_c'); ?>

account_id_c is the id of the relate field account in the opportunity editview
industry is the id of the field industry in the account editview
industryGeneratedRelate_c is the id of the field which i want to populate

where did i make a fault?

please, don’t duplicate your posts, https://suitecrm.com/forum/suitecrm-7-0-discussion/11868-how-to-automatically-complete-the-field-industry-when-choosing-account-when-creating-an-opportunity

I already asked you something there

best regards

Sorry , how can i delete it?