To migrate product masters and product variants from AX2012 to D365 FO can be a challenge. This topic explains how you can set up the migration of product masters and product variants.

Products table structure

Usually, a table in AX2012 or D365 FO matches one on one with a table in the database. However, in several cases, a table inheritance structure is used. This is the case for product masters and product variants.
For a data migration from AX2012 to D365 FO, you use a Database connector. The Database connector connects directly to the SQL database of the AX2012 environment and not to AX2012 itself.
In the SQL database, only the EcoResProduct base table is shown. The other tables, like EcoResProductMaster and EcoResDistinctProductVariant, are inherited from the base table. Therefore, in the source documents for a data migration of product masters and product variants, you can only select the EcoResProduct table.

Migrate product masters, creating external references

A product variant refers to a product master. To migrate product variants efficiently, first migrate product masters. Make sure to generate the external references during the migration.

Source document for product masters

To migrate product masters:
  1. Create a source document of type ODBC and link it to the application as defined for your AX2012 environment.
  2. Add a record to the document for the EcoResProduct table as available in the SQL database of the AX2012 environment. Note: To connect to the SQL database, the Database connector is used that is defined as default Database connector for your data migration project.
  3. To generate external references, for the EcoResProduct record, on the Line details, in the External reference field, select the RecIdSrc field. This field contains the unique ID of the record in AX2012.

Source document range

The source document record refers to the EcoResProduct table. However, you only want to migrate the product masters. Therefore, for the EcoResProduct record, define a range to limit the migration to the product masters only.
To do so, use the ID of the EcoResProductMaster table in the AOT of AX2012.
Create the range for the InstanceRelationType field.

Target document for product masters

To migrate product masters:
  1. Create a target document of type D365 FO and link it to the application as defined for your D365 FO environment.
  2. Add a record to the document for the EcoResProductMaster table in D365 FO.

Message for product masters

To migrate product masters:
  1. Create a message using the source and target documents as created for the product master migration.
  2. Add a record mapping for the EcoResProductMaster record and map it to the EcoResProduct record of the source document.
  3. To generate external references, for the EcoResProductMaster record mapping, set the External reference field to Yes. As a result, when the message is run, after a product master is inserted in D365 FO, the related external reference is created. External references are stored in the source connector application.
  4. In the field mapping, mark the DisplayProductNumber as key field.

Migrate product variants, applying external references as created for the master products

When the product masters are migrated, you can migrate the product variants. Apply the external references as generated for the product masters.

Source document for product variant

To migrate product variants:
  1. Create a source document of type ODBC and link it to the application as defined for your AX2012 environment.
  2. Add a record to the document for the EcoResProduct table as available in the SQL database of the AX2012 environment. Note: To connect to the SQL database, the Database connector is used that is defined as default Database connector for your data migration project.

Source document range

The source document record refers to the EcoResProduct table. However, you only want to migrate the product variants. Therefore, for the EcoResProduct record, define a range to limit the migration to the product variants only.

To do so, use the ID of the EcoResDistinctProductVariant table in the AOT of AX2012.
 
Create the range for the InstanceRelationType field.

Target document for product variant

To migrate product variants:
  1. Create a target document of type D365 FO and link it to the application as defined for your D365 FO environment.
  2. Add a record to the document for the EcoResDistinctProductVarinant table in D365 FO.

Message for product variant

To migrate product variants:
  1. Create a message using the source and target documents as created for the product variant migration.
  2. Add a record mapping for the EcoResDistinctProductVariant record and map it to the EcoResProduct record of the source document.
  3. To apply external references of the related product masters, for the EcoResDistinctProductVariant record mapping, for the ProductMaster field mapping, select the External reference check box.

External reference field option

For the selected External reference field option, fill in the fields. This setup gets the external reference of the related product master. As a result, the created product variant is linked to applicable product master in D365 FO.
 

Related to Notes

Design data migration

 

See also

Provide feedback