OData & Geospatial Queries

Nov 17, 2011 at 11:41 PM

Hi Rhett,

First, thanks for providing this tool - it's a great way to get jump started in doing these OData queries. I'm running CRM 2011 Online and when I attempt to execute a query, I get the following error message:

Security error.

Security error.
   at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at CRM.Tools.ODataQueryDesigner.QueryDesignerViewModel.<>c__DisplayClass1a.<>c__DisplayClass1c.<DownloadRawContentATOM>b__19()
: Server Address - https://dispatchtrans.crm.dynamics.com

But I can see the results when I click the "Show In Browser" button.

Have you had any experience attempting to do an OData query with geospatial data? I did see some proposals for OData exposing geospatial info: http://www.odata.org/blog/2011/5/3/geospatial-data-support-in-odata

And I see that there's a CTP of the WCF Data Services supporting geospatial data: http://blogs.msdn.com/b/astoriateam/archive/2011/10/17/using-geospatial-data.aspx

Is geospatial information even available from the CRM?

I'm looking to query my entity set by providing a lat/long coordinate and finding all enties that are a user defined distance from that point.

Thanks again for providing this tool!

Bob

 

Coordinator
Jan 12, 2012 at 10:28 AM

Hi Bob, in the current version the execute does not work when using CRM Online. this is resolved in the next version. Show in Browser was added to accommodate this and is just as efficient, Just remember to turn off Feed reading View in IE under Internet Options->Content Tab->Feeds and Web Slices Setting and then uncheck Turn on fFeed reading View.

With regards geospatial in CRM you would probably just create a custom entity that holds this data and then retrieve it like any other entity. I haven't seen any geospatial primitive types in CRM before, usually just lat/long co-ordinates.

Cheers,

Rhett