Microsoft Dynamics AX 2012 CU2.
This article is for those who has at least basic data flow and navigation knowledge.
About this article:
This article may answers your question like
• How to copy a legal entity from one environ to other environment? For instance; development environment to test environment, test environment to user acceptance training (UAT) environment, user acceptance training (UAT) environment to pre production environment, pre production environment to production environment etc.
• In Microsoft Dynamics AX 2012 how to copy configuration or setup data from one environment to another environment?
• In Microsoft Dynamics AX 2012 how to copy master data from one environment to another environment?
• In Microsoft Dynamics AX 2012 how to copy transaction data from one environment to another environment?
• In Microsoft Dynamics AX 2012 what are the new feature to export / import data?
• In Microsoft Dynamics AX 2012 how to use definition group?
• Is it possible to use duplicate company data for testing in Microsoft Dynamics AX 2012?
• In Microsoft Dynamics AX 2012 how to export and import configuration?
Microsoft recommends that you use the Microsoft Dynamics AX data export and import feature to support scenarios that previously required in AX 2009 the duplicate company feature. Means there is no button which you will press and system will create a duplicate company for you. But what about configuration data export and import?
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, UAT, Preproduction and deployment scenarios that moved data from one environment to another. For example development to test environment, test environment to UAT environment, Pre production to Production environment etc. However this feature became obsolete in Microsoft Dynamics AX 2012.
In Microsoft Dynamics AX 2012, company or data area is not a part of data security boundary and the new thing Microsoft introduced is organization model where data is not related to a company or legal entity. At table level there is property called SaveDataPerCompany which is the replacement of company concept. If you set this property to Yes, you hold company specific data in table.
How to copy a legal entity from one environment to another environment?
Following are the steps to use an existing legal entity as a template for other legal entities.
1. Create a legal entity to use as a template.
2. Set all configuration data for the source legal entity.
3. Create a definition group which can be used to export data.
a) To create a definition group, open your AX client. Go to System Administration module->Common->Data export/import->Definition groups->Click on New button or Ctrl + N. On General tab of Create table definition group form, provide your Definition group and Description.
b) On Options tab of above form check Include shared tables check box as shown below.
You should not check Include system tables check box, Include database log tables, Include cross-reference tables. For example if you include system tables it may stop you to access AX client.
c) This part is important: To export configuration data, include the following table groups: Reference, Parameter, Group, Framework, and Miscellaneous as shown below.
d) To export master data, you must include the tables that are in the Main table group.
e) 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. It can be difficult to create a duplicate environment for transaction data if the SaveDataPerCompany property of tables is set to No. For transaction date Microsoft SQL Server backup and restore mechanism is one of best option but a minor configuration changes can be made to illustrate specific Microsoft Dynamics AX features.
f) Now click on OK button to create definition group.
4. Now you are ready with Definition group to export data for a legal entity (Company). Go to System Administration module->Common->Data export/import->Export to. Select your Definition group from drop down and provide the file Name (and location). Remaining things are up to your choice. Clock on OK button. This will create a .dat file with your given name using the Microsoft Dynamics AX data export and import feature to export the legal entity to a .dat file.
5. In the new environment, create new legal entities, and then import the .dat file that you created into each entity individually (in step 4). Go to System Administration module->Common->Data export/import->Import. Select your Definition groups from the drop down and provide file Name (and location). Remember if you have different environment create a same definition group in your new environment where you are support to import data for a legal entity. On Advance tab there are different options but you may go for Include shared tables.
Shared and per-company data is imported. When other legal entities are subsequently imported into the new legal entities, the shared data is merged.
NOTE: Please use at your own risk. There is no warranty on this article.
In Microsoft Dynamics AX 2012 how to copy configuration and setup data from one environment to another environment.