web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Luke Sartain Dynamics / Add Xrm.Page IntelliSense t...

Add Xrm.Page IntelliSense to Visual Studio

Luke Sartain Profile Picture Luke Sartain 1,266

Despite being a CRM developer for almost three years now I still find myself having, on occasions, to refer to the Microsoft Developer Network for common Xrm.Page functions when writing client-side script, usually forgetting whether functions are in Xrm.Page.data or Xrn.Page.context.  Fortunately the guys over at MSXrmTools have put together IntelliSense libraries for both CRM 2013 and 2016 which can be easily referenced in Visual Studio to provide IntelliSense capabilities, and thus reducing the amount of time spent resolving script errors.

To get this working first head over to the MSXrmTools site (or click either 2013 or 2016 above to go directly to the JavaScript library) and save the required JavaScript library somewhere convenient on your local machine (ensuring it’s saved as a .js file).

Next load up Visual Studio.  Once loaded navigate to Tools > Options.  Then when the Options window appears expand Text Editor on the left and then also expand the JavaScript and IntelliSense tabs, before settling on References (as shown below).

lsd_intellisense_options

Once there select Implict (Web) from the Reference Group and then browse using the ellipsis button (…) for the previously saved JavaScript library.  You will then see the Xrm.Page library listed under Included Files.

Now when creating or editing JavaScript or HTML files within Visual Studio you’ll have IntelliSense capabilities.

lsd_intellisense_example1

Full credit to MSXrmTools for putting together the resource.


This was originally posted here.

Comments

*This post is locked for comments