MobItemReferenceMgt - OnAfterGetBarcodeList
System requirements
- Business Central 17 (or newer)
- MOB5.24 (or newer)
Use this event to
Append to lists of barcodes returned for an item in a semi-colon-separated format.
Used by Planned Functions
Description
This event is triggered in procedure GetBarcodeList. The procedure returns all barcodes registered for an item in a semi-colon separated list. This list can be interpreted by the mobile device and is sent out in the ItemBarcode element on the order lines.
You can use the event to modify the standard functionality by adding to the _BarcodeListToReturn variable.
Template
// [Template]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB Item Reference Mgt.", 'OnAfterGetBarcodeList', '', true, true)]
local procedure OnAfterGetBarcodeList(_ItemNo: Code[20]; _VariantCode: Code[10]; _UoMCode: Code[10]; var _BarcodeListToReturn: Text)
begin
end;
Parameters
Example: Add Item GTIN to _BarcodeListToReturn
(note: Searching for GTIN is a standard feature since MOB5.24 an no longer needs a customization in newer versions)
// [Example]: Add Item GTIN to _BarcodeList
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB Item Reference Mgt.", 'OnAfterGetBarcodeList', '', true, true)]
local procedure MyOnAfterGetBarcodeList(_ItemNo: Code[20]; _VariantCode: Code[10]; _UoMCode: Code[10]; var _BarcodeListToReturn: Text)
var
Item: Record Item;
begin
if Item.Get(_ItemNo) and (Item.GTIN <> '') then
if _BarcodeListToReturn = '' then
_BarcodeListToReturn := Item.GTIN
else
_BarcodeListToReturn += ';' + Item.GTIN;
end;
More examples
There are no items with the selected labels at this time.
Version History
Version | Changes |
---|---|
MOB5.24 | Introduced |
MOB5.53 | UoMCode parameter added |