Resolve $ undefined error for CRM HTML web resource

By | June 14, 2017

It is a common requirement to integrate HTML web resource in CRM form or open an HTML web resource as a separate window to have the additional user interface.

JQuery library is a common library to perform the script related operation and even to deal with HTML controls in such scenarios.

Sometimes we receive error “$ is undefined” as below, even though we have referenced JQuery library in HTML.

undefined error for CRM HTML web resource

The cause of the issue is that JQuery library file conflicts with CRM JQuery library. To resolve the issue, we need to do use “noConflict” method of JQuery to resolve the issue as shown below;

CRM HTML web resource

Then onward for the script, we need to use name mentioned (here “Custom_jQ”) instead of “$” to use Jquery, Example as shown below;

Dynamics CRM HTML web resource

 

Click2Clone - Copy/clone Microsoft Dynamics CRM/Dynamics 365 records

Leave a Reply