JavaScript code reuse in CRM

In most of the cases, you don’t want to copy-paste your custom methods in your CRM events source code each time you need them.
So, here’s an easy approach on javascript code reuse in CRM.
First of all, make sure you have these 2 files: LargeNumber.js and StringsExtended.js located in a custom folder – named CRMStuff – that is also located in the root folder of the Microsoft Dynamics CRM server application (the relative paths to the files should be “/crmstuff/LargeNumbers.js” and “/crmstuff/StringsExtended.js”). As you can see, these 2 files contain custom methods.
Click here to download the source code that allows you to load your *.js files at runtime.

Leave a comment

Your email address will not be published. Required fields are marked *