-->

Autofill Field in SugarCRM

2019-07-31 03:42发布

问题:

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.



标签: sugarcrm