我能夠成功地將ORGANIZATION_URL/XRMServices/2011/OrganizationData.svc/AccountSet?$select=AccountNumber
達到XRMServices並在登錄後在瀏覽器上檢索客戶帳號登錄後,但是,有一個認證服務阻止這一點,如果我使用AJAX。我的代碼如下檢索記錄中使用AJAX的jQuery
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: ORGANIZATION_URL+ "/XRMServices/2011/OrganizationData.svc/AccountSet?$select=AccountNumber,Telephone1,Telephone2,new_CustomerDiscGroup,EMailAddress1,EMailAddress2,EMailAddress3",
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json");
console.log(XMLHttpRequest);
},
complete: function (XmlHttpRequest) {
console.log(XMLHttpRequest);
},
success: function (data, textStatus, XmlHttpRequest) {
console.log(data);
},
error: function (XmlHttpRequest, textStatus, errorThrown) {
console.log(textStatus);
}
});
我錯過了什麼?
是您的AJAX調用動態CRM例如內運行在一個實體的形式?你收到什麼錯誤信息? –