最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

如何将XPO中的代码导入D365 财务和运营 / How to Import code XPO to D365 Finance & Operations

网络文摘 William 289浏览 0评论
/The following is a process to use the LCS Code Upgrade tool to import code from AX 4.0 or AX 2009 to D365.
Before you read any further, the key thing here is that you need access to an AX 2012 environment.  You need to use the 2012 environment as a midpoint in the process because only 2012 a) is supported by LCS Code Upgrade tool and b) can import xpo code.  If you don't have access to a 2012 environment, then the following probably won't be helpful to you.
So here's the process:
Prepare the AX 2012 environment
When you use the LCS Code Upgrade tool, you import zip file containing a modelstore.  (not a model!).  If you're like me, you're really only looking to move a subset of customizations...not every last object in your old AX.  The solution here is to use a 'vanilla' 2012 instance.
There are multiple ways to do this, but I did it by Uninstalling all models except the core sys/syp layer stuff.  LCS Code upgrade will see all the core AX code in your model store, but just ignore it because it's all standard.
 
WARNING: Before you uninstall models, make sure you a) have a way to get this code back, b) realize that any data tables defined by uninstalled models (or fields) will be lost.  In my case, I'm using a development environment with no valuable data.  I exported the model store (see procedure below) BEFORE uninstalling any models...and later I'll re-import that model store so I retain all my code.
In 2012 you can see the installed models in Tools, Model management, Installed models
Back up your 2012 code
If you're going to uninstall models from the 2012 environment, you probably want some way to get them all back later.  To
Uninstall unwanted models
I uninstalled VAR/CUS/USR layer models and all 3rd party (ISV) code.
To uninstall use Windows Powershell (run as Administrator) or AXUtil.  (https://technet.microsoft.com/en-us/hh433514(v=ax.50))
For example:
Now your Installed models should look something like this:
Create a new model in 2012
Create a model with the same name as the model that you intend to use in D365
To do this, in AX 2012: Tools, Modules, Create new model.
Export your code from 4.0 or 2009 in an xpo.
Import your XPO code into 2012
Making sure that you're working in your new model (see lower right of AX screen), import your xpo code from your original environment like you normally would.  The infolog that you get here can be helpful in making sure that you got all the objects that are referenced in the code.  If you missed something, just import it into 2012 - no big deal.
Export the model store
Back in Powershell or AXUtil, export your model store which will contain the sys/syp core code and whatever you imported from your xpo.
(https://docs.microsoft.com/en-us/dynamicsax-2012/developer/how-to-export-and-import-a-model-store)
For example
The file that is created will be big - maybe 5GB - so make sure you have room on your drive.  But it zips down quite a bit smaller - under 1GB.  The zipped file is what you upload to LCS.
LCS Code Upgrade process
From this point on you'll be following the standard AX2012 -> D365 Code Upgrade process.  Here's a good video overview: https://www.youtube.com/watch?v=M-AtR6ocYM8
One note on what the video covers: Each time you do the Code Upgrade process, you'll see a new folder created under Releases in Azure Dev Ops (or VS Team Explorer, Source Control explorer) as highlighted in the image below.
To complete the upgrade process you have to re-map your Visual Studio workspace (in Visual Studio: File, Source control, Advanced, Workspaces) to point to the Metadata and Projects folder that are contained in the folder that LCS just created.
Hope that helps!  Have fun!
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址