我从托管在同一个CRM实例
此代码在IE,但不以webresource作出FetchXML请求CRM Chrome浏览器...为什么呢?
$.ajax({
type: "POST",
dataType: 'xml',
contentType: "text/xml; charset=utf-8",
processData: false,
url: path,
data: fetchRequest,
beforeSend: function(xhr) {
xhr.setRequestHeader(
"SOAPAction",
"http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute"
); //without the SOAPAction header, CRM will return a 500 error
}
}).done(
function(data){
$(data).find("a\\:Entity").each(function() {
// loop entered in IE but not in chrome
}
}
);
编辑
的问题是不是与Ajax调用的问题是与.find()没有得到从返回的XML节点。
所以要清楚,我得到什么样子相同的XML在每个浏览器的请求,但这里find方法
$(data).find('a\\Entity')
回报铬没有项背...它完美的IE浏览器。
错误检查控制台(按f12) – Musa
没有错误 – Peter