Advertisements
Home > CRM, Dynamics 365 > IntelliSense in Jscript/TypeScript file – Dynamics 365

IntelliSense in Jscript/TypeScript file – Dynamics 365

In this article, lets see how to configure intellisence with XRM syntaxes in your Jscript/TypeScript files.

To enable IntelliSence, you need to install xrm npm package to your Visual Studio.

Steps to install NPM package:

  • To install npm package, you need to download and install a Visual Studio extension : Package Installer

Intelli - 5

  • Post installation, from your Visual Studio, select ‘Quick Install Package’ from Menu

Intelli - 6

  • From the popup,
    • Select ‘npm’ in the dropdown
    • In the textbox, type ‘@types/xrm
    • Click on ‘Install’

Intelli - 7

  • Post package installation, refresh the project and you should see a new folder ‘node_modules
    • Note: If you dont get the ‘node_modules’ folder, check your project’s physical location and add the folder to your Visual Studio project.

Intelli - 8

  • In above screen, ‘TypeScript’ is my project name and post above steps, I got the ‘node_modules’ project.

Enable IntelliSence in your Jscript/TypeScript file:

  • Open your script file
  • Drag and drop the ‘index.d.ts’ file from ‘node_modules’ folder on to your script file.
    • Alternatively you can also this syntax
      • /// <reference path=“../node_modules/@types/xrm/index.d.ts />

Intelli - 1

  • Start typing ‘Xrm’ and you should see the syntaxes.

Notes:

  • Those who are wondering what is a npm, it is a package manager for the JavaScript programming language.
  • www.npmjs.com hosts thousands of free packages to download and use.

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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

w

Connecting to %s

%d bloggers like this: