Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: How to print Bar Code for Batch number instead of Item number in Ax 2012 R3

$
0
0

Hi,

I am not sure about the data you want to print, but you can use the following query to display bar code based on batch number along with its associated ItemId.

static void BarCode(Args _args)
{
    InventTable inventTable;
    InventItemBarcode inventItemBarCode, barCode;
    InventDim inventDim, dim;
    InventBatch inventBatch;

    while select inventItemBarCode
        group by itemBarCode
        join inventDim
        group by inventBatchId
        where inventItemBarCode.inventDimId == inventDim.inventDimId
    {
        select barCode
            join dim
            where dim.inventDimId == barCode.inventDimId
    && dim.inventBatchId == inventDim.inventBatchId&& barCode.itemBarCode == inventItemBarCode.itemBarCode;

        info(strFmt("ItemId: %1, batchId: %2, barCode: %3", barCode.itemId, inventDim.inventBatchId, inventItemBarCode.itemBarCode));
    }
}

Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>