Showing posts with label Data migration. Show all posts
Showing posts with label Data migration. Show all posts

Friday, March 4, 2016

Export Sales orders in 5 easy steps in new Microsoft Dynamics AX RTW

In my last post, I have mentioned how to use OOB composite entity for Import/Export using Data management. In this post I will show, how to create your own composite entity. I am taking the example of Sales Order which includes Sales Header and Sales Line.

Step 1: Go to visual studio and create your custom model for Application Suite model.

Step 2: Customize the table SalesOrderHeaderStaging.


Create 2 new fields in table: RowId and ParentRowId. To create these fields, you can drag drop fields from BankJournalHeaderStaging, Similarly Create index RowIdx


Step 3: Customize the table SalesOrderLineStaging.


Create 2 new fields in table: RowId and ParentRowId. To create these fields, you can drag drop fields from BankJournalHeaderStaging, Similarly Create index RowIdx. Create a relation to SalesOrderHeaderStaing Table as shown below in the screenshot.

Step 4: Create new composite entity. Give it a name SalesOrderDataEntity. Add new root data entity reference: SalesOrderHeaderEntity and then New Embedded Data Entity Reference: SalesOrderLineEntity




Make sure Relation is set to SalesOrderHeader.


Step 5: Build the solution. Create the Export data entity as shown in below snapshot. 

Click on the Export and that's it. You can now download the file which looks like below:




Tuesday, March 1, 2016

Import/Export data using composite entity in new Microsoft Dynamics AX RTW

In this post I will cover import-export data using the composite entities in new Microsoft Dynamics AX RTW. There are 12 composite entities available out of box.

I will take example of Customer Payment Journal entity.  It has 2 following entities as a part of it.
  • CustomerInvoiceJournalHeader
  • CustomerInvoiceJournalLine


Export the Payment journal:

Navigate to Data management.
Click on Export.
Fill in the details as follows:
    Name of the data package.
    Target Data format: For composite entity only allowed  data formats are XML-Element and XML-Attribute.
    Entity Name: Customer invoice journal

Click on the Add entity.
Customer payment journal entity will be added as shown below.



Click on the export.


As you see in the above screenshot, total 38 records were exported. 8 out of Header entity and 30 out of line. Click on the Download button. The XML file will be downloaded. It looks like below:


Import the Payment journal:

Similar to export create an import data package with same entity.


Upload the XML file with the new payment journal. I created a file with 1 header and 1 line and then click on import.


Directly from Staging data you can go to created payment journal.



Journal looks like below:


You can now validate and post the journal.




Monday, February 22, 2016

Export/Import data using data management in AX 7

In this post I will be showing Import/Export using Data management in  AX7. For the purpose of demonstration, I will take example of product categories.

Product categories are defined in AX can be mapped to Retail category, Procurement category, Sales category etc.

Export of product categories:


Navigate to Data management workspace and create a new export project as shown below:


Click on export.
In export screen:
  • Set the name of the project: Product categories (this is similar to processing group in AX 2012)
  • Set Target data format : Excel
  • Entity name: Product categories
Click on Add entity.
New entity(Product categories) will be added to "Selected files and entity section".

Now our entity is ready for export.
Click on the "Export" on in the action pane.



Now you have 2 options to download.
Download package or download file.

Download Package:

If you choose this option 3 files will be downloaded:
Manifest.xml -> defines the entity structure
PackageHeader.xml -> defines the entity header
Product categories.xlsx -> actual data

Download file:

If you choose this option only excel file containing product categories will be downloaded.

Import of Product categories:


We are going to use the same files from export to Import. Navigate to Data management workspace and create a new import project as shown below:


On import screen:
  • Set the name of the project: Product categories import
  • Set data format : Excel
  • Entity name: Product categories
Click on upload and browse to the excel file which we want to import.
New entity(Product categories) will be added to "Selected files and entity section".

Now our entity is ready for import.
Click on the "Import" on in the action pane.


Your import is complete.

I have shown the import using excel, same can be done by using package.