Dear all,
I tried note 2 of below -> referencing a field that comes from an another module, on 5.0.0b,
but seems no work. Is it a bug? Anyone could help please...![]()
![]()
-------------------------------------------------
$searchFields
From SugarCRM Wiki
This article is for SugarCRM 4.5.0 or later.
This page refers to $searchFields which is metadata for Search Forms in SugarCRM. This is located in modules/moduleDir/metadata/SearchFields.php You can override the values by creating the file custom/modules/moduleDir/metadata/SearchFields.php
Example from Accounts module:
$searchFields['Accounts'] =
array (
'name' => array('query_type'=>'default'),
'account_type'=>
array('query_type'=>'default',
'options' => 'account_type_dom',
'template_var' => 'ACCOUNT_TYPE_OPTIONS'),
'address_postalcode'=>
array('query_type'=>'default',
'db_field'=>array('billing_address_postalcode',
'shipping_address_postalcode'))
);
Note 2: If you are referencing a field that comes from an another module (e.g. account_name in Contacts search: 'db_field => accounts.name'), make sure to specify 'join_name => 'accounts' in vardefs.php (eg. of Contacts module) under the 'account_name' field (which would be of type 'relate'). This tells Sugar what prefix to use when joining on that field, otherwise it will return an 'unkown column name' error during SQL execution.
Retrieved from "http://www.sugarcrm.com/wiki/index.php?title=%24searchFields"
frankext


LinkBack URL
About LinkBacks




Reply With Quote



Bookmarks