Hi there,
So I need to add some custom fields (from others modules such as Users, Contacts and Accounts) to the Meetings module. Most of them are enum type.
So far I've found these articles:
SugarCRM Developer Blog » Blog Archive » HOWTO: Add a search field that searches another module
Lairds Computer Services > Blog - SugarCRM Cross Module Search Fields
That let me get started. But now I'm stuck trying this to work with some enum fields.
Some code:
I added this to custom/modules/Meetings/metadata/searchdefs.php:
And this to custom/modules/Meetings/metadata/SearchFields.phpPHP Code:'user_tipo_user_c' => array(
'name' => 'user_tipo_user_c',
'label' => 'Tipo Profesional',
'default' => true,
'type' => 'enum',
'options' => $app_list_strings['tipo_user_list'],
'displayParams' => array(
'size' => '1', //It could work with just ONE, but It would be greate if it can work with several option
)
)
But here's the issue, the generated subquery end up this way:PHP Code:'user_tipo_user_c'=> array(
'query_type'=>'default',
'operator'=>'subquery',
'subquery'=>'SELECT u.id_c FROM users_cstm u WHERE u.tipo_user_c LIKE',
'db_field'=>array('assigned_user_id'),
'type' => 'enum'
),
Obviously this throws a mysql error.Code:SELECT u.id_c FROM users_cstm u WHERE u.tipo_user_c LIKE ''Enfermera_Coordiadora_Nal'%'
What it can be done to make it work?
Thanks in advance.
Greetings.
Using: Sugar CE v 6.2.4 w/ MySQL


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks