This is a migrated thread and some comments may be shown as answers.

Unable to show data from CRM oData source

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 19 Jun 2012, 02:32 PM
Hi,

I've created a test grid using the Kendo grid that gets data from the sample from the demos. The code looks like this:

$(document).ready(function()
{
  $("#grid").kendoGrid(
  {
    dataSource:
    {
      type: "odata",
      transport:
      {
        read: "http://demos.kendoui.com/service/Northwind.svc/Orders"
      }
    }
  });
});

This works great.

I then change the URI for the data source to point at Microsoft Dynamics CRM 2011 data, as follows:

$(document).ready(function()
{
  $("#grid").kendoGrid(
  {
    dataSource:
    {
      type: "odata",
      transport:
      {
        read: "https://testorganisation.crm4.dynamics.com/XRMServices/2011/OrganizationData.svc/AccountSet"
      }
    }
  });
});

Now the grid shows no data. Does anyone know what the problem is and if it is specific to CRM?

The data coming from the data source looks OK at that URL.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 20 Jun 2012, 06:29 AM
Hello,

The odata service at kendoui.com supports JSONP which is required for cross-domain access. Maybe Microsoft CRM does not support JSONP which is required for cross domain requests. You can check your browser's console (or developer tools) for any JavaScript errors.

 On a side note I found the following blog posts showing how to properly configure to url to a CRM service:
http://howto-mscrm.blogspot.com/2011/08/cross-domain-issue-while-working-with.html 
http://nicolaet.wordpress.com/2012/01/17/js-to-get-details-from-parent-lookup-entity/ 
 

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or