05-19-2019, 10:30 AM
I dedicated some time to this. Created unit tests for the DatabaseUtil class and refactored the functions. I fixed some minor issues in one function which I doubt would affect the problem you are having but you can try updating just in case.
Next review the custom fields, make sure they haven't been deleted but the filter hasn't been updated. If that isn't the issue, delete this part of the SQL:
INNER JOIN vt_tmp_u209 vt_tmp_u209 ON vt_tmp_u209.id = vtiger_crmentity.smownerid
and execute the rest in mysql to see if you get any error.
if not, make the same modification as above but after the mkCountQuery() function to get the result of that function and execute that on in mysql to see if you can see the error.
Next review the custom fields, make sure they haven't been deleted but the filter hasn't been updated. If that isn't the issue, delete this part of the SQL:
INNER JOIN vt_tmp_u209 vt_tmp_u209 ON vt_tmp_u209.id = vtiger_crmentity.smownerid
and execute the rest in mysql to see if you get any error.
if not, make the same modification as above but after the mkCountQuery() function to get the result of that function and execute that on in mysql to see if you can see the error.
Joe
TSolucio
TSolucio