Hello Everyone!
I was wondering if anyone knew how to implement or add a custom field to the global search. I created a custom selection-list in custom/modules/Accounts/clients/base/views/selection-list/selection-list.php, but still not work. Please check my sample code below:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$viewdefs['Accounts']['base']['view']['selection-list'] = array(
'panels' => array(
array(
'name' => 'panel_header',
'label' => 'LBL_PANEL_1',
'fields' => array(
array(
'name' => 'account_number_c',
'link' => true,
'label' => 'LBL_ACCOUNT_NUMBER_C',
'enabled' => true,
'default' => true,
),
array(
'name' => 'name',
'link' => true,
'label' => 'LBL_LIST_ACCOUNT_NAME',
'enabled' => true,
'default' => true,
),
I tried also following this documention https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.1/Architecture/Global_Search, but still not working. Check my code below:
custom/modules/Accounts/clients/base/views/search-list/search-list.php
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$viewdefs['Accounts']['base']['view']['search-list'] = array(
'panels' => array(
array(
'name' => 'primary', // This is mandatory and the word `primary` can not be changed.
'fields' => array(
array(
'name' => 'picture',
'type' => 'avatar',
'size' => 'medium',
'readonly' => true,
'css_class' => 'pull-left',
),
array(
'name' => 'name',
'type' => 'name',
'link' => true,
'label' => 'LBL_SUBJECT',
),
'account_number_c',
),
By the way my custom field is "account_number_c" and I`ve just copied the selection-list.php from Modules folder to Custom Folder.