Querying multiple fields in SearchFields.php

Hi,

I am trying to query 4 fields in the accounts module a custom search box as below. If I use the first 2 it works great, however if I add in the other 2 custom fields, the search doesn’t return anything. How do I structure a search like this?

‘phone’ =>
array (
‘query_type’ => ‘default’,
‘db_field’ =>
array (
0 => ‘phone_office’,
1 => ‘phone_alternate’,
// 2 => ‘mobile_phone_c’, //If we include this it stops working
// 3 => ‘other_phone_c’, //If we include this it stops working
),
‘vname’ => ‘LBL_ANY_PHONE’,
),

Were you able to find the solution for this issue? thank you in advance

Hi,

I found the solution, it’s like this :grin:

‘phone’ =>
array (
‘query_type’ => ‘default’,
‘db_field’ =>
array (
0 => ‘phone_office’,
1 => ‘phone_alternate’,
2 => ‘accounts_cstm.mobile_phone_c’,
3 => ‘accounts_cstm.other_phone_c’,
),
‘vname’ => ‘LBL_ANY_PHONE’,
),

2 Likes