Import duplicate company data to use for testing


This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

In Microsoft Dynamics AX 2009, the duplicate company feature was used extensively to copy data from one company to another. The feature was also used to build development or test environments, and deployment scenarios that moved data from one environment to another. However, this feature became obsolete in Microsoft Dynamics AX 2012.

We recommend that you use the Microsoft Dynamics AX data export and import feature to support scenarios that previously required the duplicate company feature.


Company, or DataArea, can no longer be used as a data security boundary. Because of changes that were made to the organization model in Microsoft Dynamics AX 2012, data is no longer related to a company or legal entity in a simple relationship that is defined by setting the SaveDataPerCompany metadata property of a table to Yes. Because data relationships are now defined through the Relations metadata property, it is not easy to duplicate all data that is related to a legal entity. Therefore, it may not make business sense to duplicate the data that is related to a legal entity. For example, we created organizational hierarchies in which legal entities and business units have a complex relationship. There is no parent/child relationship between business units and legal entities. Therefore, the duplication of business units based on legal entities in the system is erroneous.

Follow these steps to use an existing legal entity as a template for other legal entities.

  1. Create a legal entity to use as a template.

    For more information, see Create or modify a legal entity.

  2. Set all configuration data for the legal entity.

  3. Use the Microsoft Dynamics AX data export and import feature to export the legal entity to a .dat file, such as TMP.dat.

    1. Before you export data, you must create a definition group.

      For more information, see Create definition groups for import and export.

    2. To export configuration data, include the following table groups: Reference, Parameter, Group, Framework, and Miscellaneous.

      To export master data, you must also include the tables that are in the Main table group.

      Do not include the tables that are in the Transaction, Transaction header, Transaction line, Worksheet, Worksheet header, and Worksheet line table groups. These tables include transaction data.

      For a detailed list of all the tables in a table group, see Table and table group reference.

  4. In the new environment, create new legal entities, and then import the .dat file that you created into each entity individually.

    Shared and per-company data is imported. When other legal entities are subsequently imported into the new legal entities, the shared data is merged.

    For more information, see Import data from another instance of Microsoft Dynamics AX.

You can use the Microsoft Dynamics AX data import and export feature to import and modify transaction data. However, it can be difficult to create a duplicate environment for transaction data if the SaveDataPerCompany property of tables is set to No. Instead, we recommend that you use the backup and restore functionality in Microsoft SQL Server to build demo environments in which minor configuration changes can be made to illustrate specific Microsoft Dynamics AX features.