I have the following call:
$.ajax({
url: url,
type: "POST",
contentType: "text/xml",
username: user,
password: pass,
dataType: "xml",
data: {
xml: xml
},
xhrFields: {
withCredentials: true
},
complete: function (data) {
alert("Success");
alert(data);
},
error: function (xhr, textStatus, errorThrown) {
alert(textStatus + " = " + xhr.status + " (" + xhr.responseText + ")");
}
});
I get this error:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'crmurl.crm4.dynamics.com' is therefore not allowed access. The response had HTTP status code 401.
I know there are restrictions to cross-domain calls with CRM. What would be the best way to send (POST) a string/xml object to an external xml webservice?






