I'm using the $.ajax method to dynamically include plugin script files, unfortunately since this entire project is hosted in Dynamics CRM 2011, no querystring parameters can be passed to this request without rubbing CRM up the wrong way.
So executing the following:
$.ajax({
url: includeUrl, // == "Templates.js"
dataType: "script",
success: function (includedFile) {
window.Includes.push(includedFile);
}
});
will return 500 - Internal Server Error
looking at the firebug console I have requested the following URL:
http://server:5555/Organisation/WebResources/grid_/Templates.js?_=1366828753001
which has got this _=1366828753001
parameter appended by the $.Ajax method.. CRM doesn't like this very much.. I ask this knowing I'm probably between a rock and a hard place but is there any way to call $.ajax forcing it not to append this ID into the querystring?
Full error from CRM:
<description>CRM Parameter Filter - Invalid parameter '_=1366828753001' in Request.QueryString on page /Organisation/Handlers/WebResource.ashx
The raw request was 'GET /Organisation/WebResources/grid_/Templates.js?_=1366828753001' called from http://server:5555/Organisation/WebResources/grid_/EditableGrid.htm.</description>
Set cache: true
as a parameter of your $.ajax() call
That query string appended by jQuery to prevent caching of the resource being requested.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With