Question Status

Verified
tturney asked a question on 27 Jun 2013 7:42 PM

I have a need to find the current AX2012 R2 InventDim record using InventBatch, InventSerial and InventLocation fields.  Is there a way for finding the most current InventDim record (which would contain the current WMSLocation) using those three values?

Reply
Brandon Wiese responded on 27 Jun 2013 7:49 PM

By current WMSLocation, do you mean the warehouse location where inventory happens to be located?  What makes a location "current"?

Reply
tturney responded on 28 Jun 2013 4:22 AM

Brandon,

 Exactly,  the item might have a InventBatchId of 'R0001'  and a InventSerialId of 'A-1'.  As it is moved around the shop floor, the WMSlocation will keep changing.  The InventDim table just adds a new record every time the wmslocation changes.  I need to find out which InventDim record is the current one so I can find its current location.

Reply
Verified Answer
Brandon Wiese responded on 28 Jun 2013 4:50 AM

Then I believe what you want is to find the InventSum record that represents that inventory.  Find the InventSum record where ItemId equals your item of interest and PostedQty + Received - Deducted != 0, join that to InventDim on InventDimId == InventDimId, then filter on InventBatchId and InventSerialId of interest.  Whatever InventSum/InventDim record combination you find will likely be what you want.

Reply
tturney responded on 3 Jul 2013 3:44 AM

Brandon,

 Thank you for the suggestions.  This should at least help me find records that have a current value.

Tom T.

Reply
Verified Answer
Brandon Wiese responded on 28 Jun 2013 4:50 AM

Then I believe what you want is to find the InventSum record that represents that inventory.  Find the InventSum record where ItemId equals your item of interest and PostedQty + Received - Deducted != 0, join that to InventDim on InventDimId == InventDimId, then filter on InventBatchId and InventSerialId of interest.  Whatever InventSum/InventDim record combination you find will likely be what you want.

Reply