0

I am running the Custom Code Validation Tool for Microsoft Dynamics CRM 2013 and getting the following being flagged up as potential issues.

  • The occurrence of :: was located 1 time(s) in this web resource.
  • The occurrence of .text was located 10 time(s) in this web resource.
  • The occurrence of ActiveXObject( was located 2 time(s) in this web resource.
  • The occurrence of .attachEvent( was located 4 time(s) in this web resource.
  • The occurrence of .childNodes.length was located 4 time(s) in this web resource.
  • The occurrence of .firstChild was located 29 time(s) in this web resource.
  • The occurrence of .lastChild was located 3 time(s) in this web resource.
  • The occurrence of .nextSibling was located 8 time(s) in this web resource.
  • The occurrence of .previousSibling was located 2 time(s) in this web resource.
  • The occurrence of .contains( was located 7 time(s) in this web resource.
  • The occurrence of dblclick was located 1 time(s) in this web resource.
  • The occurrence of .dir was located 6 time(s) in this web resource.
  • The occurrence of .innerText was located 1 time(s) in this web resource.
  • The occurrence of .outerHTML was located 2 time(s) in this web resource.
  • The occurrence of .currentStyle was located 9 time(s) in this web resource.
  • The occurrence of opacity= was located 3 time(s) in this web resource.
  • The occurrence of .srcElement was located 1 time(s) in this web resource.
  • The occurrence of .returnValue was located 2 time(s) in this web resource.
  • The occurrence of .add( was located 9 time(s) in this web resource.

these are all coming from the one JavaScript file which is using jQuery JavaScript Library v1.6.1

Can anyone tell me: - apart from the ActiveXObject which i know is IE only if these are an issue in other mainstream browsers like Firefox / chrome. - Do I need to update the version of the java script library - Or do I need to replace these method calls with compatible ones?

user1865044
  • 301
  • 3
  • 9

1 Answers1

6

The Custom Code Validation Tool will always return issues for any jQuery library, this because jQuery support multiple browsers (including old one) and contains code to keep this compatibility.

The main point is your use of jQuery library inside your CRM, according to MSDN (I refer to the CRM 2011 version because the CRM 2013 isn't out yet)

The only supported use of jQuery in the Microsoft Dynamics CRM 2011 web application is to use the jQuery.ajax method to retrieve data from the REST endpoint. Using jQuery to modify Microsoft Dynamics CRM 2011 application pages or forms is not supported. You may use jQuery within your own HTML web resource pages.

So if you use jQuery for the REST endpoint and inside your WebResources you don't need to worry about the issues, but if you use it for manipulate the DOM (for example change the background color of a field) it is unsupported and can lead to issues with current and future releases.

Guido Preite
  • 14,905
  • 4
  • 36
  • 65