Filter issues with custom fields

Hello guys,

I recently started using SuiteCRM, my current version is 7.11.22 , and i am stuck in an issue with filtering.
I am working in accounts module and i added some custom fields there, like bonus phone and validation date for products that i got in my accounts.
Whenever i filter with a combination of fields (for instance, in the “any phone” filter option i added the bonus phone i mentioned above to the already included “office phone”) my search results are null, but if i filter without a combination of fields (for instance, if i filter with ONLY the office phone, or the bonus phone) it works fine.
Based on searching at google and on the forum i found several suggestions of altering some files, like the varderfs of the custom fields, the filters.php and some more. None of them could fix the issue for me.
What i wanna accomplish mainly is to have in my accounts module the services that someone has active (let’s say someone has 3 services active with different expiration dates for each one) and to filter via the list view based on a combination of expiration dates (for instance expiration_date_1_c OR expiration_date_2_c). Or (that would be better but i dont have a clue how to code it) to have in the list view a column that has the closest to today expiration date for an account (for instance, our current date is 04/02/2022, an account with 3 expiration dates of 20/2/2022 , 27/3/2022 , 1/1/2023 would have in the listview’s field the 20/2/2022 date mentioned).
I figured out that the filter option would be easier to code as i am not experienced enough for the second. But i hit a wall there.
My error is MySQL error 1054: Unknown column ‘accounts.bonus_phone_1_c’ in ‘where clause’

I would really appreciate some help here.
Thanks in advance!!!

Edit: I am pretty sure that the filter is searching in wrong place, i think it should search for accounts_cstm.bonus_phone_1_c, cause in my database that’s where SuiteCRM sends the data for the custom fields.

Post Locked!

For the Filter issues with custom fields, need to do some customizations in core files.

1 Like

I actually forgot to lock the post xD

Could we re-comment on the new one, please!