Hi, I try to do the same thing as shown in this link with my custom entities:
http://rajeevpentyala.wordpress.com/2012/03/26/retrieve-multiple-records-using-odata-jquery-in-crm-2011/ , but get an error:

here is my code:
function retrieveMultiple(odataSetName, select, filter, successCallback) {
var serverUrl = Xrm.Page.context.getServerUrl();
var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
if (select) {
odataUri += "$select=" + select + "&";
}
if (filter) {
odataUri += "$filter=" + filter;
}
//Asynchronous AJAX function to Retrieve CRM records using OData
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: odataUri,
beforeSend: function (XMLHttpRequest) {
//Specifying this header ensures that the results will be returned as JSON.
XMLHttpRequest.setRequestHeader("Accept", "application/json");
},
success: function (data, textStatus, XmlHttpRequest) {
if (successCallback) {
if (data && data.d && data.d.results) {
successCallback(data.d.results, textStatus, XmlHttpRequest);
}
else if (data && data.d) {
successCallback(data.d, textStatus, XmlHttpRequest);}
else {
successCallback(data, textStatus, XmlHttpRequest);}
}},
error: function (XmlHttpRequest, textStatus, errorThrown) {
if (XmlHttpRequest && XmlHttpRequest.responseText) {
alert("Error while retrieval ; Error - " + XmlHttpRequest.responseText);
}}});
}
//-------------------------------------------------------------------------------------
function readRecordsOnSuccess(data, textStatus, XmlHttpRequest) {
// Loop through the retrieved records
for (var indx = 0; indx < data.length; indx++) {
alert("Name - " + data[indx].new_debet+" "+data[index].new_credit);
}
}
//-----------------------------------------------------------------
function retrieveContactsByAccountId() {
// Pass 'Contact' set name since we are reading Contacts
var oDataSetName = "new_banking_turnover_month_yearSet";
// Column names of 'Contact' (Pass * to read all columns)
var columns = "new_debet,new_credit";
// Read Account Guid
var accountId = Xrm.Page.data.entity.getId()
// Prepare filter
var filter = "new_banking_turnoverId/Id eq guid'" + accountId + "'";
retrieveMultiple(oDataSetName, columns, filter, readRecordsOnSuccess);
}
Thanks!