Visual Studio Development Environment in Dynamics 365 for Operations

By - February 26, 2017

Microsoft Dynamics 365 for Operations is the new version of Microsoft Dynamics AX. It is a cloud-based enterprise solution. This release introduces significant changes to the development experience. During my learning journey, I have been taking notes and would like to share my findings with you.

Here are some of the new features of Dynamics 365:

  • Visual studio (VS) development environment replacing earlier MorphX environment.
  • Dynamics AX is hosted on Azure and is served from the cloud.
  • Dynamics AX application is entirely browser based and doesn’t have windows based client with an Application Object Tree (AOT).
  • Each developer will have his or her own development environment with Team Foundation Server source code control.
  • New form designs and patterns are introduced to provide a uniform and improved end-user experience.
  • The model store is represented as a set of folders and XML artifacts that are organized by models. Dynamics AX model elements like Classes and Forms are represented by XML files containing both metadata and source code. The entire application has been divided into three separate models: Application Platform, Application Foundation, and Application Suite.

Configure your Visual Studio development environment

Before you start using Visual Studio to develop with Dynamics 365, you will need to complete some basic configurations as mentioned below.

  1. Run the Visual Studio as an administrator and on the toolbar click Dynamics ‘AX 7’ -> Options
  2. Expand the Dynamics AX 7 node and click Projects
    Verify that “Organize project by element types” checkbox is selected and click OK.
    Visual Studio in Dynamics 365 for Operations - 1
  3. Click “Text Editor” -> All languages
    Select “Line numbers” checkbox. This setup makes sure that the line numbers are included in code editor in Visual Studio.
    Visual Studio in Dynamics 365 for Operations - 2
  4. Uncheck Dynamics ‘AX 7’ -> IntelliTrace -> Enable IntelliTrace checkbox and click OK. IntelliTrace is not supported by X++ debugging and could cause performance issues so make sure this setup is turned off.
    Visual Studio in Dynamics 365 for Operations - 3
  5. Expand the Dynamics AX 7 node, and click Best Practices node and check the following:
  • Dynamics.AX.Framework.BestPracticeFramework.UIRules
  • Dynamics.AX.Framework.CodeStyleRules
  • Dynamics.AX.Framework.DataAccessRules
  • Dynamics.AX.Framework.DataEntityRules
  • Dynamics.AX.Framework.DeprectatedElementsRules
  • Dynamics.AX.Framework.MaintabilityRules
  • Dynamics.AX.Framework.StaticCodeValidationRules

Visual Studio in Dynamics 365 for Operations – Development process

The diagram below illustrates the high level steps involved when developing in Visual Studio.

  1. Create a new model, package and a project before you start customizing AX.
  2. Create new elements and/or extend existing elements within the project as needed.
  3. Build and synchronize the project.

Visual Studio in Dynamics 365 for Operations - 4

New terminologies and concepts in Dynamics 365

  1. Elements – Elements are individual AX objects like Table, Form, Class etc.
  2. Projects – A project is a collection of elements. A project can belong to ONLY one model wherein a model can have multiple projects associated with it.
  3. Models – A model contains elements representing a particular software solution like Warehouse management model or Fleet management model. One model can contain multiple projects. In Visual studio, Solution explorer, you can view all available models by right clicking on AOT node and selecting Model view.
  4. Package – A package is a deployable unit that may contain one or more models. In addition to models, a package contains model metadata (like model name, description etc.) and can be exported to a file which can be imported into a staging or a production environment.

Visual Studio in Dynamics 365 for Operations - 5

Customize: Overlaying versus Extension

Dynamics 365 provides two development approaches: Overlaying and Extension.

Extensions – In the extension development approach, you can create your own model by extending or referencing an existing model like ApplicationSuite model. For example, if you wish to customize the “CustTable” table which exists in “ApplicationSuite” model, you need to create an extension of “ApplicationSuite” model. In order to create an extension of the model, you must ensure that the “ApplicationSuite” model is referenced in your new model.

The extension development approach is the best practice approach as it puts your customizations in a separate assembly that does not touch the standard application at all. This also improves the design time performance and reduces the cost associated with future upgrades.

Overlaying – The overlaying development approach stores the customization in the same assembly or DLL file. In overlaying, customizations are stored in different layers as in earlier Dynamics AX versions. As the customizations are stored in the same assembly, a complete compile of all objects is necessary. In contrast, a complete compile of all objects is unnecessary in the extension approach as the customizations are stored in a separate assembly file and only a particular model compile is needed.

No doubt there will be many questions associated with the features of Microsoft Dynamics 365. We’d be happy to share our knowledge with you. Contact our Dynamics 365 experts at RSM. You can also find more information in our RSM Online Technology Academy.

by Shamika Kshirsagar for RSM

 

Receive Posts by Email

Subscribe and receive notifications of new posts by email.