How to identify InvetTrans reserved against a given InventTrans

Hi All,

I am doing a customization, wherein I need to identify InventTrans reserved against a given InventTrans. I tried to dig out, where AX stores this information, but, am at Square 1 after a weeks search. Below is what I could understand so far:

  1. Whenever a Sales Line / Purchase Line is created, an InventTransOrigin and an InventTrans record is created for SalesLine as well as Purchase Line.

  2. When Purchase Line is marked against Sales Line, InventTransOriginID of SalesLine is stored in MarkingRefInventTransOriginId field of InventTrans record corresponding to PurchLine and vice-versa.

This is where the problem is. Since InventTrans are marked against InventTransOrigin instead of InventTrans, it is difficult to identify the exact relation.

E.g.

InventTrans
Item Qty Status LotID Reference Lot ID RecID
SO Line with 500 Pcs Item A 500 Reserved Ordered ABC XYZ 5546598955
PO Line with 800 Pcs Item A 500 Ordered XYZ ABC 5544465659
Item A 300 Ordered XYZ 5549626884

Here, how do I identfy in X++, which InventTrans are exactly reserved against each other?

Thanks and Regards,

Michael Brown