Every now and then, I come across a developer utility that’s worth mentioning. The utility might not be new or even great, but its a tool that I’m able to put to use somewhere to solve a problem or just assist in the problem solving.
The FetchXML Builder by James Downey is a great tool because it is one of those niche utilities that speeds up development time and helps the developer (me). The FetchXML Builder is a query-builder like tool used for creating FetchXML requests for Microsoft CRM.
So unless, you’re a CRM developer, you probably won’t find this as cool as I do.
I’m don’t develop specifically for CRM, but I do a lot of system integration development for other corporate information systems that interact with CRM. So maybe that does make me a CRM developer…
James’s describes FetchXML Builder as:
FetchXML Builder is an interactive query builder for constructing and testing FetchXML statements. FetchXML is an XML-based query language for retrieving data through the Dynamics CRM web services.
Although FetchXML is not as powerful as SQL, it has certain advantages when used in CRM development. Unlike the QueryExpression class, FetchXML can be used to retrieve attributes from multiple entities.
When you submit a query to Microsoft CRM, you’re required to build the query statement using the FetchXML schema and pass it to the CRM web service. You’re response will also be returned in a similar schema. So using this tool will help you build, test, and debug your query statements and give you a preview of the XML response document.
I stumbled across this a couple of months ago when I was researching the FetchXML schema. At the time, I didn’t see a use for it. However, after a while of digging through the CRM field names to build the XML query request and parse the XML response, I realized that it was something that I needed.
It’s saved me several minutes of work, just because I was able to quickly build a query and look at the response to see exactly what is being returned. That allowed me to then write my XPATH statements to parse out the response information that I needed.
There are two different versions of the FetchXML tool. One version for Microsoft CRM v3.0 and the other for the newer CRM v4.0.