Microsoft Dynamics 365

Dynamics 365 : Manage Dynamics 365 Web Resources from Visual Studio

Atul Sharma

Being from Visual Studio Programming development background, we always look to enjoy the luxury of IntelliSense, color coding, better programmer support etc and above all version control. If we continue programming inside Dynamics CRM it will be very uninteresting and dull without Visual Studio amazing features. (in my opinion)

How to do that?

  1. First of all, download this Dynamics CRM & 365 Developer Extensions from here. Its all features are mentioned on that page so I am going to focus on Web Resource (JavaScript) only.
See also  Dynamics 365 : Filtering and Fixing Lookup field Items
dynamics 365 visual studio extension

2. Save and double-click to install it.

dynamics 365 visual studio extension

3. Open Visual Studio and Create New Project. You can see New template as shown in below image. Give this a proper name. Note – Solution name here has nothing to do with your Dynamics CRM solution name, so feel free to use any name.

4. Now open Web Resource Deployer. (Steps – Right Click on Project (1) -> CRM Developer Extensions (2) -> Web Resource Deployer (3))

dynamics 365 visual studio extension

5. This will open up this screen.

dynamics 365 visual studio extension

6. Click on this (+) (1) to add the connection to your Dynamics CRM and key in the required values as shown below.

dynamics 365 visual studio extension

7. Now add a New Javascript file to project (1)-> Click on (+) (2) -> Select Filename from File drop down in opened pop up (3) -> Create (3) -> It will be shown in list (4)

See also  Dynamics 365 : Show the time stamp of Last Phone activity for an entity?
dynamics 365 visual studio extension

8. Step # 3, above will add a web resource as shown below.

dynamics 365 visual studio extension

9. Now Add this Web resource to your form. Open your Form Editor -> Click on Form Properties -> Attach function and control event as per your requirement.

dynamics 365 visual studio extension

10. Now write your validation rules or your functionality and Just click to Publish to CRM button (as shown below in red box) to directly publish. Once you publish from here, No need to publish the same from Dynamics CRM. (Point # 5 in Step 7 image)

dynamics 365 visual studio extension

What is Next …

Now you can configure and manage your code in TFS or GIT from here only along with other luxuries of Visual Studio.