DMF
Yes just a new post about DMF, not really about how it works, just an update on the latest know issues.
What you have to know:
- DMF AX2012 R2 and higher the staging table MUST have an one on one relation to the target Table.
- The menu item you select in the DMF wizard. Is for jumping from the staging table form to the target Ax Form.
- DMF wizard sometimes duplicate the table cache setting of the target table, in case of entire table cache, DMF will fail.
- In case your records have a refrecid to a record in the same table, DMF will not be able to do the job, (Chicken and his egg, what was first.)
- Add the natural keys of the related tables (where a refrecid is pointing to) to the staging table and write the replacement code yourself. Good examples are
- DMFBomEntityClass for InventDim fields
- DMFBomVersionEntityClass for HRMworkers (generate Approver)
- Running DMF not in Batch can be debugged with the AX debugger.
- DMF staging Tables use labels and not the value, so If you are running in EN-US and your customer in NL-NL, trust me it will not work out.
- DMF data is company independent but your target ax tables not, be Shure that you run them in the correct company.
- Import and export your DMF settings. DMF framework uses no refrecid add all so create a definition group
- And on the end remove all tables that do no start with ‘DMF’
- Create a clean start, in below example the table ending on Entity where my staging tables
AX2012 R2 CU7
- In AX 2012 R2CU7 the labels are missing, you can correct this by importing the labels from AX 2012R2 older ones.
- Don’t forget to remove these label files when you upgrade to CU8.
Violation of PRIMARY KEY constraint ‘PK_ModelElementData_ElementHandle’ with AX 2012R2 CU8
Last week, I was upgrading AX 2012 R2 CU7 to CU8 and ran into a model store error. The error was similar to http://blogs.msdn.com/b/axsupport/archive/2014/01/08/violation-of-primary-key-constraint-pk-modelelementdata-elementhandle-error-installing-some-hotfixes-on-microsoft-dynamics-ax-2012-r2.aspx
It scared the hell out of me! First thing that came to mind was: is my model store corrupt in production?
But the source of the problem was indeed different; found out that the issue was label files.
In the AX 2012 R2 CU7, the DMF labels were missing, so this was fixed by adding them manually (see picture below)
This means that my AX2012 R2CU7 model store was consistent.
Label files cannot be deleted directly from the AOT. In such cases, the following workaround is necessary:
- Create a new model
- Move the labels to this new model
- Finally, delete this model