Ok, danrweki
I got it now.
What do you have to do:
Take a look at the script include/SugarFields/Fields/Relate/SugarFieldRelate.php between lines 93 and 95
PHP Code:
$field_to_name = array();
$field_to_name['id'] = $vardef['id_name'];
$field_to_name['name'] = $vardef['name'];
This piece of code tells sugar to automatically populate these field when the record is selected from popup.
Did you get it?
What do you have to do?
Duplicate this directory include/SugarFields/Fields/Relate with the name:
include/SugarFields/Fields/AccountRelate
include/SugarFields/Fields/BillRelate
Make the necessary changes into the new classes (file name, class name, constructor, path to templates) and add in these lines the fields you want to acquire from other module when selecting a new record.
Cheers
Bookmarks