lunes, 22 de febrero de 2016

DIXF\DMF Duplicate a Definition group

With the data import/export framework we can easily and quickly import data from external data stores.  Here's an image I stole from the MSDN web site (it's at least 6 months old now so it's probably been moved, redesigned, relocated, deleted,..) indicating the basic steps:

The migratory pattern of a database row in AX

One of the more monotonous steps, should you be migrating data across multiple companies, is creating the data definition groups and adding the same entities to the group, but presumably with different parameters to import into the Staging table.  Example below where we use a stored procedure with a parameter to separate data across legal entities:
With a DSN datasource calling a stored procedure, passing in a company data area identifier
We can either launch the same definition group changing the parameters each time per company, or recreate the whole definition group with associated entities.

There exists another option, however.  Why not get someone clever to write some X++ to just duplicate the whole definition group to another, empty group:
Highlighted is our source group with the parameter that we are replacing
Linked is the class (alt xpo download link) I've created, use at your own discretion.  The class will ask for a Processing group as it's source, and an optional parameter value that you will be replacing from the source.  It will then look for an empty destination Processing group that you will have created beforehand and recreate the entities present in the original replacing the parameter value. It'll finally also launch the assignments for you, automatically validating them.
In the example above, the Asset table entity had a DSN datasource query as the following:
    EXEC HIEAssetTable 'HAL'
Updated in the destination to:
    EXEC HIEAssetTable 'ZZZ'


Finally, when copying DMF configuration data across AOS instances, we could also try to use the DMF framework itself to export then import the DMF data into a different installation?!  The concept makes my head hurt so I asked a colleague to set it up and it works.  Use at your own risk:
Configure a DMF group, to set up your DMF data how you like it (AX 2012 R3 CU8 example).

No hay comentarios:

Publicar un comentario