DIXF – How to manually add a missing mapping to the DMFASSETENTITY entity

I recently worked on a case with a Partner that reported that the ‘Name’ field for the DMFASSETENTITY entity did not get imported as expected into their AX 2012 R3 CU9 environment, so I thought I would share how we resolved that by manually adding the mapping, and how we tested the solution.

1. Repro testing using demo data

The first thing I did was to look at the DMFASSETENTITY entity demo data located on my AX 2012 R3 CU10 CONTOSO DEMO DATA VM.

I usually copy the demo data file that ships with DIXF to another folder and edit it there.

In this case, I copied the AssetEntity.txt file from C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\DemoFiles\Delimited to D:\DIXF\ and created a couple of variants that I wanted to test.

The NAME value is not present in the standard demo data entity, so I created one with the Name added as a field but with the data missing, and one with the Name added as a field and the data in the file.

// AssetEntityNAMEaddedButBlank.txt
AssetActivityCode,AssetGroup,AssetId,BookId,PostingProfile,Name,NameAlias,Model,Make,SerialNum,ModelYear,Quantity,PropertyType,AssetType,Barcode,Condition,InsuranceVendor,InsuredValue,UnitCost,UnitOfMeasure,InsuredAtMarketValue,DisposalDate,AssetPropertyGroup,MajorType,IsMissing,SortingId,SortingId2,SortingId3,InsurancePolicyNum,MainAssetId,Location,InsuranceDate1,InsuranceDate2,TechInfo1,TechInfo2,TechInfo3,MainAccount_DueFrom_MainAccountId,MainAccount_DueTo_MainAccountId,GoodsType_BR,ICMSCreditInstallments_BR,PhysicalAssetNumber_BR,PISCOFINSReceivableLongTerm_BR,TaxICMSOutgoing_BR,TransferredFromInventory_BR

DMF_1,BUILDINGS,DMF_05,BK-001,ALL,,,Test-15,,,10003212,,1,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,
DMF_1,MACH,DMF_06,BK-002,ALL,,,Test-16,,,10003213,,2,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,
DMF_1,BUILDINGS,DMF_07,BK-003,ALL,,,Test-17,,,10003214,,34,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,
DMF_1,BUILDINGS,DMF_08,BK-004,ALL,,,Test-18,,,10003215,,5,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,

// AssetEntityNAMEadded.txt 
AssetActivityCode,AssetGroup,AssetId,BookId,PostingProfile,Name,NameAlias,Model,Make,SerialNum,ModelYear,Quantity,PropertyType,AssetType,Barcode,Condition,InsuranceVendor,InsuredValue,UnitCost,UnitOfMeasure,InsuredAtMarketValue,DisposalDate,AssetPropertyGroup,MajorType,IsMissing,SortingId,SortingId2,SortingId3,InsurancePolicyNum,MainAssetId,Location,InsuranceDate1,InsuranceDate2,TechInfo1,TechInfo2,TechInfo3,MainAccount_DueFrom_MainAccountId,MainAccount_DueTo_MainAccountId,GoodsType_BR,ICMSCreditInstallments_BR,PhysicalAssetNumber_BR,PISCOFINSReceivableLongTerm_BR,TaxICMSOutgoing_BR,TransferredFromInventory_BR
DMF_1,BUILDINGS,DMF_01,BK-001,ALL,Test-11,Test-11,,,10003212,,1,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,
DMF_1,MACH,DMF_02,BK-002,ALL,Test-12,Test-12,,,10003213,,2,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,
DMF_1,BUILDINGS,DMF_03,BK-003,ALL,Test-13,Test-13,,,10003214,,34,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,
DMF_1,BUILDINGS,DMF_04,BK-004,ALL,Test-14,Test-14,,,10003215,,5,,,,,,0,0,,,,,,,,,,,,,,,,,,,,,0,,,,

2. Adding the mapping manually

Once I had created the input data text files, I then generated the source mapping and validated the entity OK.

I also clicked on Modify source mapping and dragged the NAME field from SOURCE to STAGING and SAVED IT

1_mapping

When I Preview source file I see the NAME data OK:

2_preview

3. Importing the data

I can Get staging data and then Copy data to target OK too:

3_get_staging_data

4_copy_data_to_target

When I look at the data in Fixed Assets, it looks OK:

5_check_name_exists

I then repeated the steps but left NAME blank in my input file, and the results are as expected then too:

6_check_name_blank

Finally, I searched for all 8 records that I’d imported, and they appeared as expected, with half of them missing the Name value:

7_check_all

4. Testing

As always, ensure you’ve set up a proper Dynamics AX TEST environment first, and that you are familiar with the impact of your DIXF actions before you perform them in PROD.

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!