adsenseheader

Monday, July 30, 2018

AX 2012 R3 to D365 upgrade


Dynamics AX 2012 R3 to Dynamics 365 for Finance and Operation, Enterprise edition – Code upgrade
Got the task to migrate the Dynamics AX 2012 code to Dynamics 365 for Finance and Operation, no need to look anywhere else, this blog series will help you to migrate AX 2012 code to Dynamics 365. Although you can find detailed documentation by Microsoft on the upgrade process, I will cover all the basic steps that are needed for code migration in summarized way.
In the first part of this series, we will look into the steps to extract the model store from AX2012 R3 environment, setup and configure VSTS and LCS project. Please note that this upgrade process currently works for Microsoft Dynamics AX 2012 R3 and its all cumulative updates (CUs), so if you want to upgrade AX2012 R2 to Dynamics 365, you first have to update it to R3 and then the code can be migrated to Dynamics 365.
Prerequisites:
Before starting the upgrade process, make sure you have access to following.
  1. AX 2012 R3 environment with administrator privilege.
  2. Access to Microsoft Dynamics Lifecycle Services (LCS).
  3. Access to Visual Studio team services (VSTS).
  4. Microsoft Dynamics 365 for Finance and Operations development environment (in our case we’ll be using VM deployed on our local machine)
Steps:
1. Export model store file
First step is to export .axmodelstore file from the AX2012 environment. Before exporting, make sure that AX2012 environment contains all of the code on specific model and layer. Use the following command to export .axmodelstore file on Microsoft Dynamics AX Management Shell (Run as administrator).
Export-AXModelStore -File <FileInfo> [-Database <String>] [-Details] [-Server <String>]
For example,
Export-AXModelStore -File c:\DEMO2012Model.axmodelstore -Details -database DynamicsAX_DEMO_model -server DEMO\DEMO2012
After this command is executed, you will find ‘DEMO2012Model.axmodelstore’ file in your C: drive root directory. The size of .axmodelstore file is usually large (in GBs), so we have to compress it (.zip) in order to upload it on LCS. To compress this file, we can use WinRAR or WinZip or any other tool.
2. Setup VSTS project
Go to https://visualstudio.com and create a free VSTS account. Do remember to use credentials that are linked with your organization (same will be needed for LCS login).
Next, enter your VSTS site (use customer name), choose Team Foundation Version Control option and click Continue.
1st1
In our case, VSTS site https://contoso365.visualstudio.com will be created. It contains one default project called: MyFirstproject.
Now we will create a new VSTS project. Click on ‘New Project’, enter project information and click ‘Create’.
4th
3. Create and configure a new LCS project
Now you have to login to LCS and on main screen, click on ‘+’ to create a new LCS project. LCS will then ask what is this project for. Select ‘Migrate, create solutions and learn’.
1st
Provide a name, and select the following values from the next menu and click create.
2nd
Next you will see the following screen. Before moving further, we first need to configure the new project with VSTS. Click on ‘Setup Visual Studio Team Services’ button.
Next you will see the following screen, enter VSTS URL that we just created in previous steps and add personal access token. Following link will guide you how to create a personal access token.

Next select the VSTS project that we just created in previous step. Click continue and review and save the changes.
Now you have to authorize LCS project with the VSTS project, on the main project screen, click Authorize.
7th
On the next screen, click Accept. You’ve now successfully configured VSTS project with your LCS project.


No comments:

Post a Comment