During preparation of a presentation about the new Data Import/Export Framework I came across an issue on the Customer entity when using AX as source data format. When the staging data is filled from the target some address fields (most of them) are filled in the wrong fields of the staging table.
So it was time to dig into it and solve this issue. The first thing I looked after was if all fields were mapped correctly. The address fields are handled by a method ‘GeneratePostalAddress’. A field ‘Return parameter sequence’ is important for returning the fields from the target to the staging table. When comparing the fields, it seemed to be that almost all fields were moved one position, except for the first three.
Within the method ‘GeneratePostalAddress a static function is called which handles a container which is filled and returned by this method. Comparing the 4th field in this container with the sequence in the target mapping learned that the field ‘TimeZone’ is missing.
The fields and order is managed by a corresponding FieldGroup on the staging table as listed below.
Indeed the field TimeZone was missing, so I added this one and moved it to the 4th position.
In the target mapping you can then delete the lines related to the method ‘GeneratePostalAddress’ and Generate the mapping again. All missing fields will be regenerated then.
Now it was time to fill the staging table again and the fields including TimeZone was mapped correctly.