Answered by:
[CRM 2013] Ajax/jQuery Error with errorThrown = "No transport" or " "

Question
-
Hi everyone,
I am trying to migrate a functionality from MS Dynamics CRM 2011 to the 2013 version, but I am confronted to a big problem. The functionality is the opening of a pop up clicking on a ribbon button of the opportunity entity, to access to an editable view. But, the initialization of the pop up is stopped by an error message in a new pop up.
It seems that this code section is the cause of my error.
//Asynchronous AJAX function to Retrieve CRM records using OData $.ajax( { type: "GET", contentType: "application/json; charset=utf-8", datatype: "json", url: odataUri, beforeSend: function(XMLHttpRequest) { //Specifying this header ensures that the results will be returned as JSON. XMLHttpRequest.setRequestHeader("Accept", "application/json"); }, success: function(data, textStatus, XmlHttpRequest) { if (successCallback) { if (data && data.d && data.d.results) { successCallback(data.d.results, textStatus, XmlHttpRequest); } else if (data && data.d) { successCallback(data.d, textStatus, XmlHttpRequest); } else { successCallback(data, textStatus, XmlHttpRequest); } } }, error: function(XmlHttpRequest, textStatus, errorThrown) { if (errorCallback) errorCallback(XmlHttpRequest, textStatus, errorThrown); else errorHandler(XmlHttpRequest, textStatus, errorThrown); } });
Something else is strange. In Google Chrome and Mozilla, the parameter "errorThrown" is empty, and in Internet Explorer, "errorThrown" is equal to "To transport".
I tried some solutions found on the web, like replacing "json" by "jsonp", but I didn't find the solution for the moment.
Thank you all for your help.
Raphael POTHIN
- Edited by Rapothin Tuesday, December 10, 2013 1:56 PM
Tuesday, December 10, 2013 1:36 PM
Answers
-
Hi everyone,
I finally found the origin of the problem : "cross domain" issue. The "url" parameter has a different format than the one used to connect to the Dynamics CRM application.
To correct issue, it's necessary to change the url parameter format used in the script.
Raphael POTHIN
- Marked as answer by Rapothin Monday, December 23, 2013 8:49 AM
Monday, December 23, 2013 8:49 AM
All replies
-
Hi,
It could be because of cross domain.
Kindly validate you odataUri
This should help
Regards,
Shraddha Dhingra
http://blogs.msdn.com/b/shraddha_dhingra/
- Edited by Shraddha Dhingra Tuesday, December 10, 2013 5:37 PM
Tuesday, December 10, 2013 5:36 PM -
Thank you for your answer, but I didn't find a solution following your link...
So, I am always open to every suggestions.
Thank you for your help.
Raphael POTHIN
Wednesday, December 11, 2013 4:00 PM -
Hi everyone,
I finally found the origin of the problem : "cross domain" issue. The "url" parameter has a different format than the one used to connect to the Dynamics CRM application.
To correct issue, it's necessary to change the url parameter format used in the script.
Raphael POTHIN
- Marked as answer by Rapothin Monday, December 23, 2013 8:49 AM
Monday, December 23, 2013 8:49 AM