问题
In Quotes module (SugarCRM Pro) i made one field region (drop down). When we select billing account name in quote name then address automatically fill up . I want that region field will automatically fill up as i have made same region in account module . I want it will automatically fetch the region from the account module as it fetch all the address.
回答1:
in your editviewdefs for that module, on the field array element, you need to add something like:
'displayParams' => array( 'field_to_name_array' => array( 'FIELDFROMACCOUNTS' => 'FIELDTOPOPULATE', 'FIELDFROMACCOUNTS2' => 'FIELDTOPOPULATE2'),),
Replace the all caps words with your fields and you should be ready to go. Keep in mind that relate fields have a hidden field that is used for the ids and make sure that you are populating it properly.
Cheers.
来源:https://stackoverflow.com/questions/15564091/autofill-field-in-sugarcrm