Tuesday, 12 February 2013

Where are the queries?

Hey developers, some non-developers, have you ever thought of where the heck the queries are of List View and Sub panels?

Let me give you the file names and function names.

List View:
  • 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.
Sub Panel:

  • 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.

1 comment:

  1. Additionally, in the SugarBean (the main object from which all Contacts, Leads, Opportunities, etc are extended from) there is a get_list_view_array and get_list that these functions rely heavily on.

    This is a great place to have a nice IDE that lets you hop around the code base by clicking method names of other classes. The code layout here all makes sense once you understand it, but it is difficult to find and control the first few times you need to do so.


Urdhva Tech Pvt. Ltd. Powered by Blogger.

Urdhva Tech

My photo
SugarCRM Consultants Contact us at contact@urdhva-tech.com Skype : urdhvatech

Search This Blog

Stay connected Socially


Total Pageviews

Popular Posts