I have a JS which has odata $select
and $filter
to retrieve a field called "ct_portfolioid"
filtering using the ct_portfoliocode
The url does not seem to return the portfolioid.The url is undefined.
var serverUrl = Xrm.Page.context.getServerUrl();
var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
var filter="ct_apxportfoliocodeSet?$select=ct_portfolioid&$filter=ct_portfoliocode eq '" + portfolioCode +"'";
$.ajax({
async: true,
type: "GET",
url: serverUrl + ODATA_ENDPOINT + "/"+filter,
contentType: "application/json; charset=utf-8",
dataType: 'json',
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json");
},