How to Execute FetchXML in CRM 2011 using a CRM 2011 webservice and JavaScript?

Paul picture Paul · May 4, 2011 · Viewed 29.8k times · Source

I want to execute FetchXML queries in a CRM 2011 environment using the CRM 2011 SOAP web services and JavaScript.

I have found a number of articles like this one showing how to use the 4.0 web service that is still available in the 2011 environment, but I do not want to do this.

This link seems to indicate that IOrganizationService.RetrieveMultiple can handle FetchXML. However, I do not want to use managed code for this.

I've come across this link that shows essentially what I want to do in the RetrieveMultiple function, but I want to be able to pass in existing FetchXML that I've written, not a new filter expression.

Answer

thuld picture thuld · May 15, 2012

To execute fetchxml queries with JavaScript a bunch of frameworks /libraries are available:

Instead of writing the code by hand these libraries provide a simple way to perform several operations and access the results. But take into account that not all libraries (currently) support cross-browser (Q2.2012).