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 ;
}

Disabling the flight in D365FO (CHD - Tier 1)

 INSERT INTO dbo.SYSFLIGHTING(FLIGHTNAME, ENABLED)  VALUES ('<FlightObjectName>_KillSwitch', 1)  or  INSERT INTO dbo.SYSFLIGHT...