Import an inventory journal with automatic numbering in AX 2012 R3

This post is a follow-up to Import an inventory journal in AX 2012 R3

I’m not going through the whole setup again here, but I’m going to pick it up where I left off and concentrate on the option for Automatic generation of a field value.

Here I’ve setup the Journal number and the Line number as automatic.

As I said in the previous post, that works perfectly for the Line number, and Dynamics AX tries to do the right thing for the Journal number by looking up the number sequence – the problem is it gets carried away and generates a new Journal number for each line. Slightly amusing if you import three lines, not so funny if you import 30,000:

So my original work-around for this was to not use automatic for the Journal number but as Javier Sullivan pointed out in a comment on my previous post, there’s a ‘Query criteria’ option that I’d missed.

I’m in my processing group setup, Data import export framework > Common > Processing group > Entities

And I click on Modify source mapping, and Mapping details, and select the Journal number (JournalID):

Now click on the Query criteria button:

Here we can specify any field in our import file, I’m going to choose the warehouse (InventLocationId):

Then just close the form.

I’ve added a couple of extra lines to my input file – now I have 5 rows, across two warehouses:

On the Processing group I perform the ‘Get staging data’:

And ‘Copy data to target’:

And check my journals, Inventory management > Journals > Movement journals:


Just like it says on the tin!


6 thoughts on “Import an inventory journal with automatic numbering in AX 2012 R3

Comments are closed.