AX 2012, Auto Reservation, Batch Number


In AX 2012, Movement Journal, I have a Journal Name with Automatic Reservation.

My item has the following setup:

Site - Warehouse - Location

Auto Batch

Active and Primary Stocking Batch Number

When I post a journal with positive quantity, it allocates Batch Number. But when I post a journal with negative quantity, it throws “Inventory dimension Batch number is a primary input/output dimension and must consequently be specified.”

What am I missing?




When i was doing Packing Slip for one particular item, the same error cames … If u found out the one you missing, pls refer which will be very very helpful for me.

Thanks and Regards,


Check the stock transactions, with autoreservation on if there is stock in the dimensions defined (site warehouse location etc) then the batch should pre-populate from on hand when you enter a negative quantity.

I tested what AdamRoue says (not because I don’t trust [:)] )… just wanted to see it working. First I thought that maybe FIFO date-controlled needed to be selected or maybe FEFO, but nope. I created 2 journals, 5 units each (two different batch created) then create the same journal with -6 units, it automatically selected 5 from the first batch and 1 from the second. Only consideration the journal used has Reservation=Automatic, and had enough stock in the same warehouse/location I was trying to grab them from.

Your case is slightly different than Lyka’s because you are in a sales order and he is in a journal.

In the sales order go to the Setup tab of the Line details in the Inventory fields group look at Reservation (=Automatic). You can manually change it in the sales order or you can have it by default from the Accounts receivable parameters\General\Sales, Default values, Reservation

Hi All,

Thank you for your valuable time. Actualluy the scenario is , User will create a SO and from that SO, he will create a PO. Once after we create PO, and trying packing slip , items without sizes which comes from SO causing the problem. If we create a direct PO, then those problem is not happening to the same items. So what i need to do in this scenario?

Also, When i was doing Packing Slip, we are updating Purch line . so confirmation of PO is changed automatically and Packing slip is happening since it the PO is no longer confirmed. So how to auto confirm it after updting the Purchline which wil be veryy help ful.

purchformletter pfl;
PurchTable ptable;
ptable = PurchTable::find(“PO/00000071/13-14”);
pfl = purchformletter::construct(DocumentStatus::PurchaseOrder);

I tried this code , but nce updating the respective PO, many validation errors came. So plz help

Thanks and Regards,

I am under the assumption everyone tests everything I say because most of the time I am not testing it [:D]

Hi All,

Now the problem has been fixed for everything… May be one of the reason is auto reservation i think so coz i dont know how it is working fine now for everything. @Adam … That is a nice quote you are using [;)] and thanks to Héctor Eduardo Cazot … [:)]