I'm new to x++ so I'm trying pick this up as I go.
I duplicated the InventOnHandItem form so that I can have customized copy.
I've learned that I won't be able to get the InventDimID from a method on the form because the data is summed.
I figured I could create a method on InventSum to return data that I want. I want to create a field that goes to InventTrans and sums the qty based on ItemID and InventDimID...
display Qty physicalReservedNT()
{
InventTrans _inventTrans;
;
select sum(qty) from _inventTrans
index DimIdIdx
group by _inventTrans.ItemId, _inventTrans.inventDimId
where _inventTrans.StatusIssue == Statusissue::ReservPhysical &&
_inventTrans.TransType == InventTransType::InventTransfer &&
_inventTrans.ItemId == this.ItemId &&
_inventTrans.inventDimId == this.InventDimId;
return abs(_inventTrans.Qty);
//return this.availOrdered();
}
When I step through the code, the InventDimID is blank for any item I use. From the InventSum table methods, how can I get InventDimID?