If you’ve been facing the pain of using CRM SDK or its Web API to fetch data, this post is for you. Normally, each time I want to fetch some data out of CRM quickly, I could just use FetchXML Builder within XRMToolBox. With this post, I’ll tell you why having the ability to fetch data using raw SQL queries against Dataverse endpoint is so important and how it helps make our life a lot easier.
If you’re reading through Microsoft documentation, you can see that the doc only tells how to query using SQL Server Management Studio (SSMs) and this feature is till in preview. I’ve tested it and it worked perfectly fine. However, we won’t be using SSMS to execute our queries, we’ll do this from code. This is super important to separate our commands and queries against our CRM instance and allows us to achieve CQRS much more easier.
Let’s us first walk through the beauty of fetching data via SSMS.