Populating fields using a Relate field

I have a custom orders module, that I am adding products to via a relate field, I want to be pull the price field into orders when a product is selected. I been following this example

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

But nothing happens when I select a product either in the quick create or the full form. Below is the code I added to the vardef.ext.php, what am I missing?

$dictionary[‘AOS_Products’][‘fields’][‘name’][‘populate_list’] = array(‘name’, ‘id’, ‘price’);
$dictionary[‘tbn_order_items’][‘fields’][‘product’][‘field_list’] = array(‘product’, ‘aos_products_id_c’, ‘price’);

Hi,

If you haven’t done it already, You will have to run a Quick Repair/Rebuild from the Admin > Repair menu.
Afterwards, Clear your browser’s cache and press CTRL+F5, and try again.

If this does not solve it, please make sure that all of the fields that you have entered are the spelled correctly and have the correct capitalization.

1 Like