Open
Description
Issue
I've requesting a Contact with filtering on a custom field.
I get database error as result
Expected Behavior
I'm expecting that the filter is also working on custom fields and not only on standard fields
Actual Behavior
Ends in SQLError:
Thu Feb 3 19:10:17 2022 [62233][1][FATAL] Mysqli_query failed.
Thu Feb 3 19:10:17 2022 [62233][1][FATAL] Query Failed: SELECT COUNT(*) AS cnt FROM contacts WHERE (contacts.ctx_mobile_c = '00436642304526') AND contacts.deleted = '0': MySQL error 1054: Unknown column 'contacts.ctx_mobile_c' in 'where clause'
T
Possible Fix
correct query to use join _cstm Table
Steps to Reproduce
1.create custom filed in contacts
2.create contact and fill custom field.
3.query the API
4.
Context
Your Environment
- SuiteCRM Version used: 7.12.2
- Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):
- Environment name and version (e.g. MySQL, PHP 7): php7.3
- Operating System and version (e.g Ubuntu 16.04): ubuntu 20