Tuesday, March 22, 2016

Missing Default Order Settings with DIXF Products import


How would you like to double the number of DIXF entities you have?

A colleague pointed me to a hotfix that will be released in AX 2012 R3 CU10. The hotfix is KB3061216 and is called ‘Support for new DIXF entities’. The hotfix description lists fourteen AX modules and shows the number of new entities in each module; in total 226 new entities. But it doesn’t tell you what the new entities are. I only knew one way to find out, so I installed it into my R3 CU9 Demo VM.
Since I wanted to know which entities were new, first, I dumped a list of the entities that I had in CU9 into Excel; 238 in total. And then I installed KB3061216. And after completing the software update checklist, I rushed to the ‘Target entities’ form and hit the Export to Excel shortcut. And I still had 238 entities. Hmm. Not what I was expecting. Perhaps the list needs refreshing. I looked around for an option to do that, but couldn’t find one. What if I delete them all, and then re-open the Target entities form? Worth a try – and that did it. Now I have 467 entities.
That’s a whole 229 new entities. Actually, I did some comparisons and found that two of the entities in CU9 had disappeared – ‘VendPaymFee’ (Payment fee in the A/P module) and ‘Terminals’ from the Retail module. So that’s 231 new entities. What are they all? To save you the bother of installing the hotfix to find out, I’ve attached an Excel list of all 467 entities.
In the list, the lines in green are entities that were added by the hotfix. I don’t know if any existing entities have been extended – I took a look at the Product entity and it appeared that it had not been. Let me know in the comments below if any entities you’ve really been waiting for have been added.

Missing Default Order Settings with DIXF Products import

I was importing new Released Products into Microsoft Dynamics AX 2012 R3 using Data Import Export Framework’s ‘Products’ entity. Although the import was apparently successful, I found that fields on the Default Order Settings form were all greyed out.
Default Order Settings
All fields on the Default Order Settings form are greyed out.
I had last encountered this problem nearly two years ago in AX 2012 FP. At that time, DIXF was in Beta, and Microsoft were not accepting bug reports. Thinking about filing one now, I decided to investigate the cause. The Default Order Settings form has three datasources:
  • InventItemInventSetup
  • InventItemPurchSetup
  • InventItemSalesSetup
Looking at these tables, I could see that DIXF had created records for my imported items, but the field ‘InventDimIdDefault’ was blank. With items created using the AX client (and which did not have a default site defined) this field contained the value ‘AllBlank’. I decided, for a quick fix, to add these three fields to my import. In the AOT, I opened the table DMFProductEntity and expanded the Fields node. In another window, I browsed to InventItemInventSetup. I dragged the field ‘InventDimIdDefault’ from this table onto the Fields node of DMFProductEntity. This created a new field in DMFProductEntity called ‘InventDimIdDefault’. I renamed it ‘InventItemInventSetup_InventDimIdDefault’. I repeated this for the other two tables, and compiled DMFProductEntity. This caused three new fields to be created in the Product’s Staging table.
DMFProductEntity
Adding fields to DMFProductEntity
In the Product CSV file that I was importing, I added three columns with the names ‘InventItemInventSetup_InventDimIdDefault’ etc. In each column, the values in all records were set to ‘AllBlank’. In DIXF, I opened my Processing group for the Products import and hit ‘Entities’. I then hit Generate source mapping and confirmed I wanted it to generate from scratch. This ensured the new fields in my data were mapped to the new fields I had created in the Staging table
Staging table mapping
The new fields are mapped to the staging table
Still in DIXF, I then found the ‘Product’ Target Entity and hit ‘Modify target mapping’. I did ‘Refresh diagram’, and then switched to the ‘Mapping details’ view. I hit ‘Generate mapping’, confirming that I wanted to generate the mapping from scratch. When this was complete, I scrolled down to confirm that my three fields were mapped to ‘Target fields’ with the same names.
Target mapping
The new fields are mapped to the target
I then ran the import, and found this time that I was able to use the Default Order Settings form as expected on my newly imported items. Perhaps I shan’t bother logging it with Microsoft after all!

UPDATE 13th March 2015: I notice that Microsoft have released a hotfix for Dynamics AX 2012 R3 which sounds like it resolves this problem with the Products entity in DIXF:
KB 3047371: Cannot edit default order settings after importing product data by using Data Import export framework (DIXF)

UPDATE 16th June 2015: I notice that Microsoft have released a related hotfix for Dynamics AX 2012 R3 for a problem with the ‘Item’ entity in DIXF. It seems AX will assume the InventDim record which has no inventory dimensions is ‘AllBlank’, even if it is not:
KB 3069778 : “item” Target entity import using DIXF assumes that the blank INVENTDIMID is “AllBlank” without interpreting what is in the blank INVENTDIMID record for the company that you are importing into

DIXF error after changing Licence Configuration

If you’re using Data Import/Export Framework and the supplied entities you may experience the following error:
SysDictTable object not initialised
‘SysDictTable object not initialised’ error
This example appeared when attempting an import using the ‘Product’ entity. The full text of the error is:
SysDictTable object not initialised.
Stack trace
(C)\Classes\DMFEntityWriter\write – line 244
(S)\Classes\DMFEntityWriter\runOnServerWriter – line 14
(C)\Classes\DMFEntityWriter\run – line 98
(C)\Classes\DMFEntityWriter\main – line 24
(C)\Classes\xMenuFunction\run
(C)\Classes\MenuFunction\run – line 85
(C)\Forms\DMFWriteData\Designs\DesignList\DMFEntityWriterBatch\Methods\Clicked – line 23
The problem is caused when the entity contains fields which do not exist in the database. And that can happen when you’ve altered the Licence Configuration or Licence Information to remove functionality; in this example, I had disabled Retail functionality and functionality for several different regions.
It is possible to get DIXF to regenerate the field mapping, which will cause the fields that no longer exist to be removed. To do this, open the ‘Target Entities’ form. From the list, select the entity that gives the error and click ‘Modify target mapping’. Now you must switch to ‘Mapping details’ and then click ‘Generate mapping’. Click ‘Yes’ to generate mappings from scratch. The list of fields in the bottom part of the form will update; in my example fields like InventTable.AssetGroupId_RU and InventTableModuleInvent.MaxiRetPrice_IN disappeared.
This may be enough to solve the problem. In my example, it was not. Checking the entity structure for the ‘Product’ entity (‘Target Entities’ -> ‘Entity structure’) I saw that datasource ‘RetailInventTable’ was listed.
Product Entity Structure
The ‘Product’ Entity Structure
I knew that all Retail functionality was disabled, but the Entity structure cannot be altered from within this form. You can alter the Entity structure from within the AOT. If you browse the contents of table ‘DMFTargetENtityHierarchy’, you can filter by the entity you are interested in (column ‘QueryName’). Here, I can see the record for ‘RetailInventTable’, and I am able to delete the record using Alt+F9:
DMFTargetEntityHierarchy
DMFTargetEntityHierarchy filtered to show the Product entity
Once this is done, I am able to successfully import Products.

No comments:

Post a Comment

Export a copy of the standard user acceptance testing (UAT) database

 Reference link: Export a copy of the standard user acceptance testing (UAT) database - Finance & Operations | Dynamics 365 | Microsoft ...