How to upgrade code from AX 2012 R3 to Dynamics 365 for Operations?

Network of MS Dynamics D365, AX, NAV, GP, SL, CRM, RMS, POS professionals Forums Microsoft Dynamics AX / Axapta AX Developers How to upgrade code from AX 2012 R3 to Dynamics 365 for Operations?

This topic contains 2 replies, has 3 voices, and was last updated by  Locus IT 11 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #20535

    Andrew Jenson

    Can anyone please tell me the steps for upgrading the code from AX 2012 R3 to Dynamics 365 for Operations?


    Adrian Cohen

    Hello Andrew,

    You will need access to a Finance and Operations development environment using Remote Desktop, and be provisioned as an administrator on the instance. You should be familiar with some of the Dynamics 365 for Operation development, customization and user interface concepts before you upgrade your code.


    1. Model split
    2. Auto-migration using the LCS Code Upgrade service
    3. Manual migration steps
    4. Address code migration tasks
    5. Resolve casting exceptions
    6. Migrating context menus and mouse double-click code


    Locus IT

    Hello Andrew,

    Most of these steps also apply to code migration between two major versions of Finance and Operations.

    Model split
    The Finance and Operations application is split into several packages, or assemblies: Platform Packages

    1. Application Platform
    2. Application Foundation
    3. Test Essentials

    Application Packages

    1. Application Suite
    2. Other application packages.

    ISV and customer code that is migrated from Dynamics AX 2012 R3 will be re-baselined into the correct package.

    Auto-migration using the LCS Code Upgrade service
    The LCS code upgrade service takes a Dynamics AX 2012 R3 model store as input and completes the following tasks:
    • Converts metadata into the latest format.
    • Re-baselines metadata, by moving and merging, into the right model.
    • Provides an estimation to understand the effort required to upgrade the solution.
    • Runs migration rules that auto-migrate parts of a solution.
    • Runs migration rules that inform developers what to manually fix by using TODOs.
    • Automatically checks-in the upgraded solution into your Azure DevOps project.

    Manual migration steps
    After you upgrade your code using the LCS code upgrade service configure your developer VM and Azure DevOps to connect to the upgraded code branch.

    For each of your upgraded models:
    • Fix merge conflicts.
    • Fix compilation errors related to a model split (references across packages).
    o Typical error messages are:
    o <Element Type> X refers to <Element Type> Y which does not exist.
    o The name <Name> does not denote a class, a table or an extended data type.
    o For example, your overlayering customizations may be referencing elements or code that are higher in the package dependency graph:
    o A method in the Directory model is referencing a table in the Application Suite package.
    o A form in the Directory package is referencing a data source in the Application Suite package.
    o You will have to refactor your code to address these dependencies by moving model elements or business logic to higher level packages.
    o Delegates for Migration describes how to use delegates to solve some of these issues.
    • Fix compilation errors.

    In the Best Practice framework, there is a subset of Best Practice warnings that need to be resolved to complete migration. This applies if you are migrating from Dynamics AX 2012 R3 or earlier.
    1. In Visual Studio, click Dynamics 365 > Options > Best Practices.
    2. In the Model drop-down menu, select Application Suite (Repeat with all models you are working on)

    These rules should be set to “ON” while migrating your solution. The setting is driven by an XML file in the AxRuleSet folder. For example, see the Application Suite xml file, BPRules.xml, located under C:\Packages\ApplicationSuite\Foundation\AxRuleSet.

    Address code migration tasks
    When metadata is migrated to Finance and Operations, multiple auto-upgrade scripts are run. In the case where developers need to complete manual migration tasks, TO DOs and Best Practices (BP) have been added.

    1. In Visual Studio, open Application Explorer, and search for the form, PurchCommitment_PSN.
    2. Click OK.
    3. Right-click the project and select Properties.
    4. In the Model property, select Application Suite.
    5. In the Company property, select FRSI.
    6. Note: The form is located in the French demo data company FRSI.
    7. Press Ctrl+F5 to see the form.

    Navigation migration tasks
    1. In Visual Studio, build the project, and then on the toolbar, click View > Task List.
    2. Click the Comments drop-down list to view the TO DO: (Code Upgrade) tasks.
    3. In the list, find the ActionPane TODOs.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Skip to toolbar