SBX - Search With Button

SBX - Forum Post Title

Link the InventbatchID to the Salesline

Microsoft Dynamics AX Forum

FrankRaij asked a question on 9 Nov 2018 9:13 AM

Question Status

Verified

Hello,

I guess not very difficult but I am still can't. How can I link the Inventbatchid to the Salesline. I know via the Inventdim, Inventtrans, Inventtransorigin, but I am struggeling with it.

I am working on the SalesConfirm SSRS report and I want to add the batchnumber to the salesline (from SalesconfirmDetailsTmp).

Thanks!

Reply
Suggested Answer

SalesLine.InventDimId has relation to InventDim.InventDimId. And in InventDim you have field InventBatchId.

Reply
FrankRaij responded on 9 Nov 2018 10:12 AM

Hi Nikolaos,

Thanks!! For some reason I don’t get a match on the inventdim. The batch is reserved. Maybe the route via inventtransorigin?

Reply
Rustem Galiamov responded on 9 Nov 2018 11:00 AM
Verified Answer

Hi FrankRaij!

You can get InventBatchId values from InventTrans.InventDimId. To get it you should use InventTransOrigin table.

SalesLine.InventTransId == InventTransOrigin.InventTransId

InventTrans.InventTransOrigin == InventTransOrigin.RecId

InventDim.inventDimId == InventTrans.inventDimId

Reply
FrankRaij responded on 9 Nov 2018 1:15 PM

Thanks! It works! Do you have experience with the tmp table SalesconfirmdetailsTmp most ideal would be that I can link with that table but the only link I can make is to the Custconfirmjour / custconfirmtrans but then I have the details of all the saleslines linked to a individual sales line (from the salesconfirmdetailsTmp

Reply
Verified Answer

I think you can't directly link SalesLine to SalesConfirmDetailsTmp.

The SalesConfirmDetailsTmp has only ItemId field, and if sales order will have more than one lines with the same ItemId you can't determine needed row.

Reply
FrankRaij responded on 13 Nov 2018 3:00 AM

Ok! Thanks Rustem. Then I'll have to find another way. I think I am going to use the CustconfirmTrans then. Problem there that I need the taxpercentage (only have the the Taxgroup, Taxitemgroup and Taxwritecode).

Reply
magic1949 responded on 13 Nov 2018 5:04 AM
My Badges

Note also that there may also be more than one batch picked per sales order line. or that the same batch may be used to fulfill many sales orders.

Reply
Rustem Galiamov responded on 9 Nov 2018 11:00 AM
Verified Answer

Hi FrankRaij!

You can get InventBatchId values from InventTrans.InventDimId. To get it you should use InventTransOrigin table.

SalesLine.InventTransId == InventTransOrigin.InventTransId

InventTrans.InventTransOrigin == InventTransOrigin.RecId

InventDim.inventDimId == InventTrans.inventDimId

Reply
Verified Answer

I think you can't directly link SalesLine to SalesConfirmDetailsTmp.

The SalesConfirmDetailsTmp has only ItemId field, and if sales order will have more than one lines with the same ItemId you can't determine needed row.

Reply
Suggested Answer

SalesLine.InventDimId has relation to InventDim.InventDimId. And in InventDim you have field InventBatchId.

Reply

SBX - Two Col Forum

SBX - Migrated JS