How to Query data in Dynamics 365 CRM Online using XrmToolBox?

Follow my earlier articles to know more about XrmToolBox.

We frequently use Advanced Find to query the data in Dynamics 365 CRM Online environment, but this always not helps us to achieve the desired results.

In XrmToolBox, there is a Tool “SQL 4 CDS” to query Dynamics 365 CRM/ Dataverse environment online.

Follow the below steps to query your Dynamics CRM data.

Step 1: Launch XrmToolBox and Install “SQL 4 CDS” tool.

Step 2: Click on Yes to connect to your organization.

Step 3: Select your required Dataverse connection and Click on Connect.

XrmToolBox is getting connected to the Dataverse environment.

Step 4: Once, XrmToolBox is connected to Dataverse environment successfully, you can see the below SQL Query editor like window.

Step 5: You can start writing your SQL Query in the Query editor.

In this example, i want to get the Top 10 records of Contact table with firstname, lastname, fullname, mobilephone and emailaddress1 rows data.

SQL Query is as follows,

Select top 10 firstname, lastname, fullname, mobilephone, emailaddress1 from contact

Step 6: Click on Execute to get the result.

Below is the result retrieved from Contact table from the required Dataverse environment.

You can query based on your requirement and get the desired results using this SQL 4 CDS tool in XrmToolBox.

Hope you liked this article and do please share your valuable feedback on this article.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.