populating fields using relate field

Hi,

I really got confused and I definitely need some help:

from tutorial:
https://johndopenotes.wordpress.com/2013/03/18/sugarcrm-populating-fields-using-a-relate-field/

I have tried the above tutorial but it doesn’t work. (Will this work in suitecrm?)

I might be missing something. I want to discuss it one by one so I will be able to trace what I have been missing.

$dictionary[’<MODULE_NAME>’][‘fields’][’<RELATE_FIELD>’][‘populate_list’] = array(‘name’, ‘id’, ‘<FIELD_FROM_RELATED_MODULE>’);
$dictionary[’<MODULE_NAME>’][‘fields’][’<RELATE_FIELD>’][‘field_list’] = array(‘account_name’, ‘account_id_c’, ‘<FIELD_TO_POPULATE>’);

Scenario: when a contact is selected in a relate to field, it should be able to populate/display the mobile information of the contact in a custom field within the meeting.

$dictionary[‘Meeting’][‘fields’][‘parent_name’][‘populate_list’] = array(‘parent_name’, ‘id’, ‘contacts_cstm’);
$dictionary[‘Meeting’][‘fields’][‘parent_name’][‘field_list’] = array(‘parent_name’, ‘id_c’, ‘contact_mobile_c’);

Please help…

Hi,

The only thing I noticed that could cause issue with what you have done would be:

Where the line says:

$dictionary['<MODULE_NAME>']['fields']['<RELATE_FIELD>']['populate_list'] = array('name', 'id', '<FIELD_FROM_RELATED_MODULE>');

You have entered:

$dictionary['Meeting']['fields']['parent_name']['populate_list'] = array('parent_name', 'id', 'contacts_cstm');

contacts_cstm is the name of the db table in the Database, not a field name.
If you haven’t created a custom phone field, The Phone field name will either be ‘phone_home’, ‘phone_mobile’ or ‘phone_work’
Otherwise, use the field name. (It will likely end in _c)

Replace ‘contacts_cstm’ with the mobile phone fieldname, and it should work if everything else is correct.

Also, make sure that you have followed the rest of the guide. (Including the Quick Repair & Rebuild)