List view appears empty even though there are records in the database

Hello,

I am having an issue with a custom module. If I create a record for this custom module, I get taken to the detail view as normal and the fields are all filled in as they should be. If I immediately go to the list view for the custom module it is empty and says “You currently have no records saved”. I can still see the record in my history in the sidebar and if I click it I get taken to the detail view which is still working.

This happens even when logged in as admin. I have also adjusted security groups and roles, but it hasn’t solved this issue. If I check the database table for this module I see all the records that were created, and the created_by and assigned_user_id values are correct. So the records actually exist but for some reason the list view keeps coming up blank. This is one of 4 custom modules I have installed and this is the only module exhibiting this behaviour.

Has anyone had any similar issues? Any ideas on how to fix or investigate this? Any advice would be appreciated.

Thanks,
Jordan

If anyone is having this issue this thread here: https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/13455-listview-empty-in-custom-module-why helped me solve it. I followed the instructions to get the SQL statement that suite was trying to run, and when I tried to run it in MySQL workbench I got an error message telling me my table was missing a column!

Please tell us your SuiteCRM version, the exact commands you tried, and the exact error you got. Thanks

I have the same problem,V 7.9.17.
Add ‘print $main_query;’ in Line 319 and it show:
SELECT accounts.id ,accounts_cstm.name_en_c,accounts_cstm.status_c, accounts.assigned_user_id , accounts.name , jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner , ‘Users’ assigned_user_name_mod, accounts.date_entered , accounts.date_modified FROM accounts LEFT JOIN accounts_cstm ON accounts.id = accounts_cstm.id_c LEFT JOIN users jt0 ON saved_search.assigned_user_id=jt0.id AND jt0.deleted=0 AND jt0.deleted=0 where accounts.deleted=0 ORDER BY accounts.date_entered DESC

when run the SQL in DB, error show:
#1054 - Unknown column ‘saved_search.assigned_user_id’ in ‘on clause’.

I wonder why there’s ‘saved_search’ in the SQL.

Finally, ‘Quick Repair’ help me fix the bug.