Search code examples
javascriptdynamics-crmodatadatajs

Unable to get value of the property 'parse': object is null or undefined


I'm trying to make a connection and download anything using oData format. The URL pointing to a service that I'm using returns a nice oData-ishly looking document. Now, I'd like to read in those contents into my JavaScript method and play with it for a while. I can't, though, due to the error that the property parse is not findable. That makes me sad.

According to this page (and a lot of others that I've found) the error in subject is caused by a non-available JSON parser. This issue is apparently a big deal for IE7 and below. But I'm on IE9 and IE10 and both experience the same issue. JSON support is supposed to be integrated into them by default.

  1. Can JSON support be turned off in IE10 and if so how?!
  2. How do I test if my browser, as of right now, right here, can handle JSON data?
  3. What more can be done to make my machine get the data?
  4. Could it matter that the service is on a CRM Dynamics 2011 server?

The code I'm executing to get there is below. It's fetched from the project's site for DataJS at this location. Of course, I've tested that the OData object exists and is accessible.

OData.read(
  "https://myurl/2011/OrganizationData.svc/crmk_CustomEntitySet",
  function(dataSet) { alert("Yippi!"); },
  function(errorMessage) { alert("Buuuu..."); }
});

Solution

  • You need to provide a doctype for IE9 to use the JSON object, like this:

    <!DOCTYPE html>
    <html>
         <head>...</head>
         <body>...