DIXF

AX7/D365/Operations: Create custom data entity

Posted on Updated on

Purpose:

The purpose of this document is to demonstrate how we can develop a custom data entity for a custom table in Dynamics 365 for Operations.

Prerequisites:

  • Access to Dynamics 365 for Operations instance via remote desktop.
  • To be provisioned as an administrator for the instance.
  • Visual Studio project, model, package have been created.
  • Custom table has been created in the project.

Business requirement:

Ability to perform data operations on custom table.

Development:

We’ll be developing a data entity for a custom table, MAKInventRawMaterial for this scenario.

1. Click Ctrl+Shift+A to add new item to the project.
2. Select Data Model > Data Entity, giving name MAKInventRawMaterialEntity. Click Add.

DataEntity1

3. Specify data entity properties as shown below and select MAKInventRawMaterial table as the Primary datasource. Click Next.

DataEntity2

4. On the next screen of the wizard, review the data entity fields. You may choose to Convert labels to field names. Click Finish.

DataEntity3

5. The following highlighted development artifacts must be created.

DataEntity5

6. Open project properties and set Synchronize Database on Build to True to synchronize the newly created table and data entity with database.

DataEntity4

7. You have now successfully created a custom data entity!

To see the custom data entity in action, please see the following post.

https://dynamicsaxinsight.wordpress.com/2017/06/13/ax7-d365-operations-data-import-using-data-entities/

 

AX7/D365/Operations: Data import using data entities

Posted on Updated on

Purpose:

The purpose of this document is to demonstrate how we can import data using data entities in Dynamics 365 for Operations.

Prerequisites:

  • Access to Dynamics 365 for Operations instance via remote desktop.
  • To be provisioned as an administrator for the instance.

Business requirement:

Ability to import/migrate legacy business data to Dynamics 365 for Operations.

Process:

1. Navigate to Workspaces > Data management > Import.
2. Enter job details as shown below. We have selected a custom data entity Raw material in this scenario. You can safely use any standard data entity instead.

DataEntity6

3. Click Upload to select and upload the source data file.
4. Click View map to generate field mappings.
5. On Map source to staging screen, click Mapping visualization.
6. Define the mapping. Click Save.

DataEntity7

7. Now go back to the job screen and click Import.
8. At the end of the execution, you should see the Execution summary.

DataEntity8

9. You can verify the data loaded by navigating to the relevant form. In this case Raw Materials details master form.

DataEntity9

AX7/D365/Operations: Data export using data entities

Posted on Updated on

DataManagement


Purpose:

The purpose of this document is to demonstrate how we can export data using out-of-band (OOB) data entities from Dynamics 365 for Operations.

Prerequisites:

  • Access to Dynamics 365 for Operations instance via remote desktop.
  • To be provisioned as an administrator or at least data management officer for the instance.

Business requirement:

Ability to export customer master for USMF legal entity.

Process:

1. Navigate to Workspaces > Data management.
2. Click Export tile.
3. Enter JOB DETAILS as follows. We have selected Customers data entity for this scenario.

Step1

4. Click Add entity button. You should see Customers data entity added to the right pane.
5. Click Export button.
5. After the job ends, you can see the count of records exported on the Execution summary screen.

Step3

6. Click the ellipsis button to download the file.

Step4

7. You should be able to see the exported records in the Excel file.

Result

AX7/D365/Operations: Data entities export data error

Posted on Updated on

Error1


 Exception:

While exporting data from local VM of Dynamics 365 for Operations, you might get an error if the Azure storage emulator is not running.

Microsoft.WindowsAzure.Storage.StorageException: Unable to connect to the remote server —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

Resolution:

You can start the Azure storage emulator by following the steps below:

  1. On OneBox VM, run command prompt as administrator.
  2. Navigate to “C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\”
  3. Run “AzureStorageEmulator.exe start”

This should resolve the issue reported above which surfaces while exporting data through data entities in Dynamics 365 for Operations.

Emulator

AX 2012: Add custom field to standard DIXF target entity

Posted on

Purpose:

The purpose of this document is to describe how we can add custom fields to standard DIXF target entity. While performing data migration for standard entities like customer, we often come across a requirement to load data for customized fields as well. In this post, we will add custom fields of customer master to its standard DIXF entity.

Business requirement:

To load customer master through DIXF along with custom fields.

Assumptions:

1. Custom fields are already added to CustTable table.
2. DIXF component is up and running.
3. ODBC source data format has been configured.
4. Prestaging database and table is ready to fetch data from.

untitled

Development:

1. The following are the custom fields that need to be loaded through standard DIXF entity for customer master:

untitled

2. Add custom fields to DMFCustomerEntity table, which is the standard DIXF staging entity for customer master.

untitled

3. Add the same fields to the DMF field group of DMFCustomerEntity table.
4. Add the same fields to DMFCustomerTargetEntity query.

Queries > DMFCustomerTargetEntity > Data Sources > Customer(CustTable) > Fields

5. Make sure the same fields exist in the target entity, CustTable table.
6. Open Data import export framework > Setup > Target entities
7. Create new target entity as follows. You must create a new target entity to include the newly added fields.

untitled

8. Verify the newly added fields by looking at the mappings.

untitled

9. Create new processing group and select the newly created target entity

untitled

10. Generate source mapping and verify the mappings by clicking Modify source mapping.

untitled

11. You can also preview the source data by clicking Preview source file to validate data is pulling up correctly.

untitled

12. Get staging data

untitled

untitled

13. Copy data to target.

untitled

untitled

14. You can verify loaded customers in All customers list page.

untitled

15. You can also verify custom fields loaded successfully!

untitled

 

AX 2012: Customize DIXF for cross-company import

Posted on Updated on

Purpose:

The purpose of this document is to demonstrate how we can customize DIXF (Data Import Export Framework) to import customers across the companies. The standard DIXF can only import records in the current company/legal entity. Customization will allow us to perform cross-company data import.

Business requirement:

Ability to import customers through DIXF across the companies.

Assumptions:

Data import export framework has been successfully installed.

Development:

1. Create a project to include the following objects:

Untitled

2. Add new field ImportCompany to DMFCustomerEntity table and set the properties as follows:

Untitled

3. Add new method existsInCompany to CustTable table and give the following definition:

static server boolean existsInCompany(
	CustAccount _custAccount,
	DataAreaId _dataAreaId)
{
    boolean found;

    changeCompany(_dataAreaId)
    {
        found = (select firstonly RecId from CustTable
         	    index hint AccountIdx
                        where custTable.AccountNum == _custAccount).RecId != 0;
    }

    return boolean;
}

4. Customize method insertUpdate of class DMFCustomerEntityClass to have the following definition. You can see that the modification has been wrapped within the BEGIN MOD and END MOD comments.

Untitled

5. Change the RunOn property of class DMFCustomerEntityClass to Server as shown below:

Untitled

6. Create new Data import export framework > Common > Processing group to import customers.

7. In the Select entities for processing group form:

  • select Customer for Entity
  • select Excel for Source data format
  • Generate source file

8. Prepare sample customer data to be imported as follows:

Untitled

9. In the Select entities for processing group form:

  • select the file in the Sample file path
  • Generate source mapping
  • Preview source file

10. You should be able to preview the sample data without any error:

Untitled

11. Change the current legal entity to any entity other than CEU to test the cross-company import scenario:

Untitled

12. In the Processing group form click Get staging data to import records in staging table:

Untitled

13. In the Processing group form click Copy data to target to import records to target table:

Untitled

14. Change the current legal entity back to CEU.

15. Click Accounts receivable > Common > Customers > All customers. You should be able to see the newly imported customers.

Untitled

As you have seen that we have successfully imported customers to CEU legal entity while being logged in to DAT legal entity, we can use the same customization to perform cross-company import. We just need to fill in the different legal entities in the ImportCompany column of the source Excel file.