
I am getting CORS error while calling Third party REST URL from CRM 2016 javascript in IE 11. If I enable "Access data source across domains" in IE 11 security. It is working fine. As per client polity they are not going to enable "Access data source across domains". How to overcome this issue...
$.ajax({
url: "https://alphaTest:443/sql/management.cls", // example url
type: "POST",
async: false,
crossDomain: true,
contentType: 'text/xml',
headers: {
SOAPAction: "gama.com/Management.Search";// example url
},
beforeSend: function (xhr) {
xhr.setRequestHeader('Access-Control-Allow-origin', '*');
},
data: requestData,
success: function (SOAPResponse, hrs) {
return SOAPResponse;
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
Thanks in Advance...
*This post is locked for comments
I have the same question (0)Hello,
You have 2 ways:
1. Ask customer to apply that change to all PCs they use - salimadamoncrm.com/.../making-cross-domain-ajax-calls-from-crm-form-jscript
2. Move Rest Calls to server side - salimadamoncrm.com/.../crm-2013-actions-to-get-around-javascript-cross-domain-challenges