Saturday 28 January 2012

CRM 2011: IntelliSense for Xrm.Page

http://www.patrickverbeeten.com/pages/ContentItemPage.aspx?id=31&item=118&p=true

In CRM 2011 Javascript is no longer embedded in forms but now has build in feature to use external resource files. You can edit these files using the web browser or in an external editor. Visual studio supports Intellisense for JavaScript, this explains how enable the support for the CRM provided objects such as the Xrm.Page object to be shown.
To enable this support Visual Studio needs a reference to base the IntelliSense. First you need to download the reference file XrmPage-vsdoc.js (right click and choose save). Save this file on a convinient location. Now you can create a new js file in Visual Studio then add the following line to the top of this file:
///
The path to the file can either be relative or absolute, in this example the reference file is placed in a folder named IntelliSense in the folder where the new web resource js file is saved.

I have only tried this file with Visual Studio 2010. If there are any function which are incorrect or other errors please let me know.
This file is distributed as Freeware for details see here or the license contained in the file.

On this site http://crm2011snippets.codeplex.com you can download a set of snippets to automate common functions for JavaScript used with CRM.

No comments:

Post a Comment