How to get SQL Query of Groups created in Sage CRM

In Sage CRM, Groups feature allows you to create, edit, and save lists of people, companies, leads, cases, opportunities, quotes and orders based on defined filter criteria. Groups are based on the SQL views generated by queries. The views that are used to create group’s needs to be designed such that each row should return unique value of the id i.e. Company, Person, and Lead ids etc. We can create below 2 types of groups in Sage CRM.

Static Group:
This group stores the query that generated the group and the no. of records returned by query. Whenever you open the Static group, you will always see the list records that were returned last time. You have to refresh the contents of this group manually using Refresh button available on the screen.

Dynamic Group:
This group only stores the query that generated the group. Whenever you open the dynamic group, the query gets run and the group contents gets refreshed.

You can create groups by 2 ways. First is, carry out a search for the data you want and then, click on the “Create New Group” button and follow the instructions given. Second one is, from the Groups tab available in My CRM. In the above 2 methods, we can add any filter criteria that needs to be required.

Suppose, you have created a group based on the prerequisite of client and now you want to create a view which will return the same data as per the group. For this, you will need the SQL query which is returning the same data. Well, you can get the SQL query of the group by following below steps.

Click on the “SQL” button available on the screen, which will open the SQL query of group in popup window as shown in below screenshot.

By following above steps, you will get the SQL query of Group. And using the same query you can create a view in CRM which can be used to create Reports, Dashboards etc.

About UsGreytrix a globally recognized Premier Sage Gold Development Partner is a one stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.