$ Is Undefined

May 14, 2013 at 10:01 PM
Edited May 14, 2013 at 10:02 PM
I have been using version 1.1 of this tooklit for a year now and it is awesome. Saved me a ton of time and I have built a pretty lengthy utility library on top of it.

However I now have an issue. I have an environment that is on-premise R12. I had a solution built online that I imported to the on-premise solution.

In my on-premise version, I am getting the error "Object doesn’t support property or method selectSingleNode". As noted elsewhere in the discussions, I upgraded to 1.4.1. Simply created a new Web Resource with the 1.4.1 code and swapped it out on my form.

On the same code that was working with R13 online, I am now getting:
"Error: '$' is undefined"

There are no dollar signs in my own code other than in an unrelated regexp.

Any ideas? Thanks again for a great product.
Coordinator
May 15, 2013 at 9:30 AM
Hi There.

$ is used by jQuery library. The latest library requires jQuery, JSON2 to be loaded before the functions of XrmServiceToolkit library being called.

The requirement of jQuery library was introduced around 1.2 if I remember it right. Try to add jQuery library in and let me know if that solves your issue.

The other possibility is because RU13 is loading JavaScript libraries asynchronously which may also cause some issues.

http://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/03/03/crm-2011-polaris-asynchronous-javascript-loading.aspx

Hope this helps.

Jaimie
May 15, 2013 at 3:55 PM
Thanks for the quick reply. I installed the jQuery piece in conjunction with the core 1.4.1. code and it works fine now.