Let me give you the file names and function names.
- Go to include/ListView/ListViewData.php
- Search for function getListViewData
- Scroll down until you see $main_query = $ret_array[‘select’] . $params[‘custom_select’] . $ret_array[‘from’]
- Right below that you can print the query for List View.
- Go to data/SugarBean.php
- Search for function get_union_related_list
- Go to the end of the function and before it returns the result echo $final_query to see the queries of subpanels.
Hope you find this post useful.
Feel free to post your comments.