Notifications
Announcements
No record found.
Hello Guys,
I want to print Bar code for Batch Number instead of Item number in Ax 2012 R3 .
Is there any option to achieve this ?
*This post is locked for comments
Hi Naveen,
Not sure if it helps, but for Purchasing - product receipt (stock items) we are using Document Routing/Layouts under Warehouse Management - Setup - Document Routing. We designed our own label to be printed when the goods arrive on site, including Batch number with bar code etc.
Regards,
V
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)); } }
Hi Chaitanya,
Interested to know will this query work during product receipt with multiple batch numbers
Scenario : Barcode for batch number to be generated while product receipt, the steps to follow during product receipt given below
1. Purchase registration process (registered qty 50 with Batch number 001 and 2nd registered qty is 25 with batch number 002, and 3rd registered qty is 25 with batch number 003)
2. Checked the print product label field during product receipt
3. Select the relevant report in the print product label screen
4. Out of box functionality doesn't show up the batch number in the print screen displayed.
Would like to know is this query will work while product receipt of purchase order ?
Did you implemented the query and is that works ?
Thanks.
I don't think we can use this query.Let me check and provide you the updated one.
HI SKT,
Have you use any query during product receipt with single batch numbers ?
Hello guys,
I have done this solution, want to share.
For print Bar Code for Batch number instead of Item number in we need to create a new method in RetailLabelDP class like below.
private BarCodeString batchbarCodeStr(InventBatchId _inventBatchId){
Barcode cBarcode; str barcodeString;
barcodeString=_inventBatchId;
cBarcode = Barcode::construct(BarcodeType::Code128);
if (cBarcode.validateBarcode(barcodeString)) { cBarcode.string(true, barcodeString, BarcodeContentType::Item); cBarcode.encode();
RetailTracer::Info('Retail label', funcName(), strFmt('Barcode %1 is validated successfully', barcodeString)); } else { RetailTracer::Error('Retail label', funcName(), strfmt("@RET5019", barcodeString)); // When a barcode is not valid, an error should be thrown here throw(error(strfmt("@RET5019", barcodeString))); }
return cBarcode.barcodeStr();
}
Now Declare InventBatchId iid; and call this method in RetailLabelDP >insertTmpTable like below.
iid = (select firstOnly inventBatchId from inventBatch order by inventBatchId desc where inventBatch.itemId == _table.ItemId).inventBatchId;
tmpTable.ItemBarCode = this.batchbarCodeStr(iid);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2