Quantcast
Channel: Dynamics NAVAX
Viewing all articles
Browse latest Browse all 219

Create a custom entity mapping using the Data Migration Framework [AX 2012]

$
0
0

In my last blog post, I went through the steps to using the Data Migration Framework. This post, I will explain the technical side of it.

To create a custom entity mapping, click on the Data migration framework > Create a custom entity for migration. Follow the wizard and enter your main table you want to import for.

Once the wizard is finished, it will generate an AOT project.

2012-08-01_1135

To explain the elements:

QueryThe query is a definition of the target table. You could add additional table relationships in there if required for mapping.
TableThe table suffixed with Entity is the stagging table to use for importing.
EDTThe foreign key fields using RecId. The EDT generated is a string field representing the code (identification field).
ClassThe class is where we can put your business logic. For example, the EDTs with RecId need to be resolved. The below is a screenshot of a method that takes a string code and finds the related RecId (container is just a standard way of returning it).
2012-08-01_1144
Then override the getReturnFields, adding your Generate method.
2012-08-01_1146

There other more complex uses for the entity class, other than resolving fields. Such as generating whole records like the Global Address book.

Viewing all articles
Browse latest Browse all 219

Trending Articles