How to get entity values with OData on dynamics crm/365

Try this code below;


function GenerateODataUrl(depth) {

        var url = "";

        if(depth != undefined && depth == true){
             url = window.parent.Xrm.Page.context.getClientUrl() + "/xrmservices/2011/OrganizationData.svc";
        }else{
             url = Xrm.Page.context.getClientUrl() + "/xrmservices/2011/OrganizationData.svc";
        }

	return url;
}

function getAccount(Id) {

	var url = GenerateODataUrl() + "/AccountSet?$filter=AccountId eq guid'" + Id + "'";

	$.ajax({
		type: "GET",
		contentType: "application/json;charset=utf-8",
		datatype: "json",
		url: url,
		async: false,
		cache: false,
		beforeSend: function (XMLHttpRequest) {
			XMLHttpRequest.setRequestHeader("Accept", "application/json");
		},
		success: function (data) {   
			debugger;
		},
		error: function (XMLHttpRequest, textStatus, errorThrown) {
			debugger;
		}
	});
}

#ajax-odata, #dynamics-crm-odata, #javascript-odata-request, #odata