
Hi there all
It seems using jquery in crm script is an unsupported way, but I have to do some text Processing and need methods of jQuery.
How can I use that?
Any help will be appreciated.
Hi Albert,
You can add javascript web resource in CRM which contains below jquery:
ajax.googleapis.com/.../jquery.min.js
When you need to use any jquery method, please load this webresource then use your respective jquery method.
function onChangeOfAnyField(){
LoadWebResource("bzmap_jquery3.2.1.js");
// add your jquery logic
}
function LoadWebResource(resource) {
var httpRequest = null;
var serverUrl = "https://xyz.crm.dynamics.com";
try {
if (window.XMLHttpRequest) {
httpRequest = new XMLHttpRequest();
}
else {
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
httpRequest.open("GET", serverUrl "/webresources/" resource, false);
httpRequest.send(null);
eval(httpRequest.responseText);
}
catch (e) {
alert("LoadWebResource >> Error loading " resource ":\n" e.description);
}
}