In this post we’ll use the
xrm declaration files contributed to the Definitely Typed repository by David Berry, Matt Ngan, Markus Mauch and Daryl LaBar. You can read more on TypeScript declaration files here.
Adding the xrm library intellisense to Visual Studio Code using NPM
- Create an empty project folder and then open the folder in VSCode following
File>Open Folder..and then clicking
- Open the terminal window in VSCode by following
- Install the TypeScript Definition Manager,
typingsglobally which provides access to TypeScript declaration files e.g. xrm and angular etc.
- Download the XRM declaration files to the by typing the following into the terminal:
The above will add a typings folder and an xrm folder nested in it. Inside the xrm folder is where our declaration folder is placed.
- Start writing your CRM application extension code. Et voila Intellisense!
Full credit to David Berry and company because they have also added Help messages on most of the functions and as well.
If you don’t want to install node which comes with
npm you have to manually download the declaration files from the Definitely Typed git repository and place them in your project folder. The declaration files have a