Announcements
No record found.
[ExtensionOf(formControlStr(SalesTable, SalesLine_ItemId))] final class SalesTableForm_ItemIdControl_???_Extension { public boolean modified() { boolean ret; FormStringControl ctrl = this as FormStringControl; ItemId itemId = ctrl.text(); InventTable inventTable; if(itemId != '' && !InventTable::exist(itemId)) // ItemId has been entered but it is not valid InventTable Item { inventTable = InventTable::find(InventItemBarcode::findBarcode(itemId, False, False).itemId); if (inventTable.ItemId != '') //Not an Item found with barcode { info(StrFmt("Barcode value entered. Item ID: %1.",inventtable.ItemId)); //Optional ctrl.text(inventTable.ItemId); // Update the control with the correct Item Id //WHEN DEBUGGING THE ctrl.text is "" //How do I refresh the form ???????? } } ret = next modified(); return ret; } }
[ExtensionOf(formDataFieldStr(SalesTable,SalesLine,???BarcodeScan))] final class SalesTableForm_SalesLineDS_???_Extension { // If the barcode scan field is modified update the Item Id and clean out the scan field public void Modified() { FormDataSource ds, ds_inventdim; FormDataObject df = any2Object(this) as FormDataObject; SalesLine salesLine; next Modified(); // Call original method ds = df.dataSource(); salesLine = ds.cursor(); if(salesLine.???BarCodeScan) { InventItemBarcode inventItemBarcode; InventDim inventDim_barCode; inventItemBarcode = InventItemBarcode::findBarcode(salesLine.???BarcodeScan, False, False); if(inventItemBarcode) { ds.object(fieldNum(SalesLine, ItemId)).setvalue(inventItemBarcode.ItemId); ds.object(fieldNum(SalesLine, ItemId)).modified(); inventDim_barCode = InventDim::find(inventItemBarcode.inventDimId); salesLine.InventDimId = inventItemBarcode.inventDimId; InventDim currentInventDim = element.inventdim_ds.cursor(); salesLine.???BarCodeScan = ''; currentInventDim.InventColorId = inventDim_barCode.InventColorId; element.updateProductDimensions(currentInventDim); info(StrFmt("@???:ItemIdBarcode", inventItemBarcode.ItemId)); } } } }
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 509 Super User 2026 Season 1
Giorgio Bonacorsi 375
Adis 268 Super User 2026 Season 1