JavaScript and TypeScript Intellisense.

Video Demo

XrmToolkit provides both JavaScript and TypeScript files that allow you to have all the intellisense features in Visual Studio for your CRM forms. To learn how to generate these files see the documentation found here.

The following 2 files are generated:

  • 'Form Specific.js' or 'Form Specific.ts'
  • 'Xrm.js' or 'Xrm.d.ts'

Please ensure that the form specific file is placed above the Xrm.js or Xrm.d.ts file in the references area of the file that you are working in.

In order for the intellisense features to work properly, you must include both of these files as references at the top of the file that you would like intellisense for. See the image below as an example:

Intellisense for the Xrm.Page JavaScript object

Intellisense for the 'Xrm.Page' object is provided by XrmToolkit. For more information regarding the CRM JavaScript model please see Microsoft's documentation here.

Enhanced Intellisense Features

Note: The attribute name, and other enhanced intellisense features only work with VS2012 and above.

'getAttribute' and 'getControl' Intellisense Features

  1. Typing in the 'getAttribute' method filters the available properties. Both the display name and logical name of the attributes are shown.
  2. The selected properties 'Description' is shown as the tooltip.
  3. Shows the overloaded options for the 'getAttribute' method.

Picklist Attribute Intellisense Features

Starting in version 3, intellisense is also provided for picklist attribute values. If the attribute specified in the 'getAttribute' method is a picklist attribute and you are trying to set its value then all the available options appear with their numeric value. Once the value has been selected, the numeric value is placed in the 'SetValue' method.

Additional Intellisense

Intellisense is also provided for the following methods: