Thursday, March 9, 2023

AX 2012 R2 CU9 (Originally CU6) to D365 F&O Code & Data Upgrade

 Over the past several weeks I have been attempting to upgrade our AX DB into D365 mainly using instructions from here.  

Before doing the steps there, you will need to see if you  have a 'Display' menu item named 'SysCheckList_UpgradeToNextV'.  If you don't have that (Which I did not), then you will need to install KB4048614.  This will give you an upgrade checklist to prep your database and modelstore for the upgrade. (This will require going through the standard software update checklist.)

After going through some failed attempts, I narrowed my focus to 2 main paths:

  1. Upgrade my company's custom code / data ONLY.
    1. This means removing ALL ISV models. This was ok for us as our ISVs have D365 solutions.
  2. Upgrade my company's custom data that fits in vanilla AX. 
    1. This means removing ALL custom models.
For BOTH options, you must do a full compile, full CIL, and FULL DB sync along with running the new checklist from above.

For option 1, the best idea is to move ALL your customizations into 1 single model.  For some reason, mine were spread out over 4 different models.  You can keep it in different models, however, I think it makes it more difficult.
After attempting a code and data upgrade for option1, we decided to remove ALL non data related customizations. (Classes, forms, etc.) This would leave us with only our Tables, EDTs, etc. 
However, after looking at the amount of work to upgrade this, we decided to give option 2, from above, a try.

All customizations were removed and we began the 'Data upgrade' using the link above.  Our database is pretty big (Over 300 GB). This upgrade process took over 48 hours.  Aside from time, we only ran into a couple of errors in the 'ExecuteScripts' step.  We had to skip 2 steps. To do that, you can follow instructions here. For some reason there were duplicate records in 4 tables so there were some DB sync failures.  They were easily fixed and we were able to get the full data upgrade completed.


AX 2012 R2 CU9 DIXF Data Export

 As we are now moving to D365, we need to export our data. Our partner assumed we had DIXF, however, we are in CU6 and it doesn't have DIXF.

In order to use DIXF we upgrade one non-production environment to CU9. (Microsoft recommended either CU8 or CU9 not CU7).

Once we upgraded that, we could then use DIXF.  However, this left an issue of how to get new data from PRODUCTION into this CU9 environment.

  1. Using the test data transfer tool, export out ALL DMF tables.
  2. Refresh non-production environment transactional DB as usual. (DO NOT refresh model DB)
  3. Run CU9 KB upgrade to upgrade the DB
  4. Run and complete the software update checklist.
  5. Using the test data transfer tool, import ALL DMF tables.
Although this does take me about 3 hours to complete it gets the job done.  Steps 1 and 5 allow us to continue to develop our data entities in DIXF and perform refreshes without losing out progress.

AX 2012 Workflow Originator

 Recently, I had a request to bulk close out 500+ cases that were currently in workflow.  The issue I came to was I couldn't find where the workflow was pulling the 'Workflow originator' from. After some research, I found that it is stored in the SysWorkflowTable and the Originator field.