If you’re using Data Import/Export Framework and the supplied entities you may experience the following 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)ClassesDMFEntityWriterwrite – line 244
(S)ClassesDMFEntityWriterrunOnServerWriter – line 14
(C)ClassesDMFEntityWriterrun – line 98
(C)ClassesDMFEntityWritermain – line 24
(C)ClassesxMenuFunctionrun
(C)ClassesMenuFunctionrun – line 85
(C)FormsDMFWriteDataDesignsDesignListDMFEntityWriterBatchMethodsClicked – 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.
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:
Once this is done, I am able to successfully import Products.
