Tuesday, July 8, 2014

OnHand Qty from item ID in Table AX 2012

// To get On Hand Qty from item ID in Table


display InventQty qty()    //Real

{
    return InventSum::hhtAvailPhysical(this.ItemId) +
        ( select sum(Ordered) from inventSum where inventSum.ItemId == this.ItemId).ordered +
            ( select sum(Arrived) from inventSum where inventSum.ItemId == this.ItemId).Arrived -
                ( select sum(ReservOrdered) from inventSum where inventSum.ItemId == this.ItemId).ReservOrdered -
                    ( select sum(OnOrder) from inventSum where inventSum.ItemId == this.ItemId).Onorder ;
}

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...