CRM 2011 – How to use external Javascript files

There are a few javascript files which you want to call, like json2.js file and probably jquery.js file.

I couldn’t understand initially how you to call another Javascript file from within my javascript file.

The actual answer was quite obvious after I worked it out.

you have to import the Javascript file as a webresource.  This won’t mean you will be able to access it because you also have to make sure you select the file in the form properties and then Add it in the form libraries.

What this means is when the form loads, it will also load the javascript file.  Once it is loaded you can then call the functions on the form.

I only worked this out because I added the other Javascript file and when I was debugging I could then see all of the Javascript files I had loaded.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.