Network Error while accessing external service from CRM web resource
We had a requirement to fetch and display data from external hosted service, on a HTML web resource hosted in CRM.
So I created a HTML file with below logic to fetch data from external hosted service.
var xmlhttp = new XMLHttpRequest();
xmlhttp.open(‘POST’, {External Service URL}, false);xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
// Success
}
}
}
The logic was working fine, when I tested individual HTML fine.
But when hosted in CRM, I was getting “Network Error”.
Reason :
- Cross domain issue while accessing HTML from CRM
Fix :
- Setting “Access data sources across domains” to “true” in IE browser solved the issue
🙂
Categories: CRM
Access external hosted service, CRM, HTML, Network error
Comments (0)
Trackbacks (0)
Leave a comment
Trackback