Friday 8 September 2017

Dynamics CRM JavaScript Intellisense

In World of Microsoft Dynamics CRM most the time as a developer needs to write JavaScript code.
In Dynamics it is vital to use Xrm library.  As developer we knows most of the functions provided by Xrm JavaScript library.

But it is hard to remember all functions.
JavaScript is Case-sensitive language. So some silly mistakes can cause issue.

We always want some ready to eat food so we will not bother about these things.
In this Visual studio can help us. We aware about visual studio provide intellisense for our help.
In visual we can also add code Snippets that will help in our coding.

I am going to share how you can combine these all together to remove overhead to remember Xrm code and case-sensitive mistakes.

1. You need to install  Dynamics CRM Developer Extensions in visual studio.
For this open visual studio go to Tools->Extensions and Updates-> search online for "Dynamics CRM Developer Extensions". or you can download from here Visual Studio Gallery.

2. After installation you will see "CRM Developer Extensions" template is added in visual studio.

3. Now you are ready to use Xrm code Snippets in your JavaScript file.

If we want to see all the code Snippets added by this extension.
Go to Visual studio->Tools->Code Snippets Manager than select JavaScript from drop down.


















Now click on "Dynamics CRM" it will show the location of Code Snippets.
Open that location and  you will find all the Xrm reference added for you.

4. In your JavaScript file you need only to write XRM rest work will done by Intellisense for you.
Now you can select the function you want and press "Tab" key twice. Now you will see complete Xrm function written for you.
5. If you want to add more Code Snippets or rename any Snippets that will more meaning full for you can do this by adding or editing any file specify in system "Dynamics CRM" location.

Happy Coding !! 😄

Please share your comment below.



No comments:

Post a Comment

Field Security Profile - Based on Owner

 Recently received requirement related to Field security profile. Expectation : - 1.       Set to users need access of secure attributes. 2....

Test