Does any one have came across any project/code to Create ASP.NET Application with Gridview to display CRM data using Dynamics CRM OData URL??
I try to create simple asp.net application using visual studio with simple JQuery syntax like below, but for some reason this does not work. If i create simple HTML page using NotePad++ and use this code, it works.
Any idea what am i doing wrong or do i need to pass any authetication token when i use visual studio or any thing else??
$.ajax({
type: "GET",
datatype: "json",
data:"{}",
crossDomain: true,
beforeSend: function (XMLHttpRequest) {
//debugger;
XMLHttpRequest.setRequestHeader("Accept", "application/json");
XMLHttpRequest.setRequestHeader("Content-type", "application/json; charset=utf-8");
//debugger;
},
url: "testserver/.../OpportunitySet$select=CreatedOn,EstimatedCloseDate,Name,OpportunityId",
async: false,
success: function (data, textStatus, xhr) { debugger; alert(data); },
error: function (xhr, textStatus, errorThrown) {
debugger;
alert(textStatus + " " + errorThrown);
}
});