I have found strange issue in MS CRM 2013, and since it seems to be by design, I need help to find a way around it.
The issue is it's impossible to call getScript
jQuery method from WebResource.
The CRM adds version string to the url, and this causes request fail with error 500
.
For example, when I'm trying to call: /Organization/WebResources/Synchronization.js
The CRM turns this request into following: /Organization/WebResources/Synchronization.js?_=1402918931398
and it fails with server error 500
.
Here is the sample code I'm using:
var settings = {
url: "/Organization/WebResources/Synchronization.js",
dataType: "script",
success: function (data) {
console.log("success");
},
error: function(jqXHR, textStatus, errorThrown) {
console.log("error");
}
};
$.ajax(settings);
Could you please point me, how I can find out when URL
is changed?