Error filtering a dashlet by a related field created in the constructor #5253

Open
opened 2026-02-20 16:32:01 -05:00 by deekerman · 0 comments
Owner

Originally created by @SinergiaCRM on GitHub (Sep 17, 2024).

Issue

Error filtering a dashlet by a related field if the field was created in the constructor.

This error is observed in suitecrm.log:

Query Failed: SELECT users.id , users.created_by FROM users where (user_id_c='1' ) AND users.deleted=0: MySQL error 1054: Unknown column 'user_id_c' in 'where clause'

Video: Filter dashlet by related field

Possible Fix

No response

Steps to Reproduce the Issue

  1. Create a new module and add a new field related to the users module.
  2. Add that field to the Edit, Dashlet List, and Dashlet Search views.
  3. Publish the module and create several records that have different values ​​in the related field.
  4. Add a dashlet of this module and filter by the related field.
  5. Check that it does not return any records and that the log looks like this: Query Failed: SELECT users.id , users.created_by FROM users where (user_id_c='1' ) AND users.deleted=0: MySQL error 1054: Unknown column 'user_id_c' in 'where clause'
  6. Repeat steps 1 to 5 with a field created from Studio instead of from the constructor and check that in the step 5 if it returns the records correctly filtered.

Context

No response

Version

7.14.5

What browser are you currently using?

Firefox

Browser Version

129.0.2 (64-bit)

Environment Information

MySQL, PHP Version 7.4.33

Operating System and Version

Ubuntu 22.04.4 LTS

Originally created by @SinergiaCRM on GitHub (Sep 17, 2024). ### Issue Error filtering a dashlet by a related field if the field was created in the constructor. This error is observed in suitecrm.log: `Query Failed: SELECT users.id , users.created_by FROM users where (user_id_c='1' ) AND users.deleted=0: MySQL error 1054: Unknown column 'user_id_c' in 'where clause'` Video: ![Filter dashlet by related field](https://github.com/user-attachments/assets/4f4d7489-f5c0-4624-aaae-4b43c1ed5da7) ### Possible Fix _No response_ ### Steps to Reproduce the Issue 1. Create a new module and add a new field related to the users module. 2. Add that field to the Edit, Dashlet List, and Dashlet Search views. 3. Publish the module and create several records that have different values ​​in the related field. 4. Add a dashlet of this module and filter by the related field. 5. Check that it does not return any records and that the log looks like this: `Query Failed: SELECT users.id , users.created_by FROM users where (user_id_c='1' ) AND users.deleted=0: MySQL error 1054: Unknown column 'user_id_c' in 'where clause'` 6. Repeat steps 1 to 5 with a field created from Studio instead of from the constructor and check that in the step 5 if it returns the records correctly filtered. ### Context _No response_ ### Version 7.14.5 ### What browser are you currently using? Firefox ### Browser Version 129.0.2 (64-bit) ### Environment Information MySQL, PHP Version 7.4.33 ### Operating System and Version Ubuntu 22.04.4 LTS
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5253
No description provided.