Advertisements
Home > CRM > Network Error while accessing external service from CRM web resource

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
Access data sources across domains

Access data sources across domains

🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: