We are currently using jQuery (1.7) to request data from intranet systems by Ajax from inside the account entity form.
Everything works fine using the web client from IE, Firefox, Chrome in Windows (7) and even Safari on Mac OS X (10.6).
Opening the account form using the Outlook client however fails throwing an "Access denied" error. It seems the request isn't even sent to the server, since we cannot log it using Fiddler or other http logging tools.
Our current setup is: CRM 2011 Rollup 14 (5.0.9690.3557) + Outlook Client 5.0.9690.1992
The failing script looks like this:
$.support.cors = true;
$.ajax({
type: 'POST',
url: m_serviceUrl + '/json/' + 'CheckAddress?',
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "json",
xhrFields: {
withCredentials: true
},
success: function (result) {
completedCallback(result);
},
error: function (error) {
if (failureCallback == null || failureCallback == 'undefined') {
alert("Error: " + error.responseText);
}
else {
failureCallback(error);
}
}
});
The error applies only to forms opened from Outlook, WebResources hooked into the main navigation using the same technique do not have this problem.