Dynamics AX 2012: X++ Load Line Reduce Picked Quantity

Hi,

You can use code below:

private void decrementLoadLine(WHSLoadLine _loadLine)
{
    WHSUnShip               WHSUnShip;
    WHSTmpLoadLineInventory tmpLoadLineInv;
    ;

    WHSUnShip = new WHSUnShip();
    
    tmpLoadLineInv = WHSUnShip.buildTmpTable(_loadLine);
    
    while select tmpLoadLineInv
    {
        WHSUnShip.unShip(
                        InventDim::find(tmpLoadLineInv.InventDimId),
                        tmpLoadLineInv.InventQty, // qty to reduce
                        _loadLine,
                        tmpLoadLineInv.ContainerId,
                        tmpLoadLineInv.InventQty);
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *