Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleSystem requirements
  • Business Central 17 with feature "Item Reference" enabled.Business Central 18 (or newer)
  • MOB5.26 24 (or newer)

Use this event to

Excerpt

Append to lists to lists of barcodes returned for an item in a semi-colon separated formatitem in a semi-colon-separated format.


Used by Planned Functions

...

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 override to modify the standard functionality by changing or appending adding to the _BarcodeListToReturn variable.

...

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"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

Expand
titleClick here for parameters...
  • _ItemNo: Item number.
  • _VariantCode: Variant Code for the item.
  • _UoMCode: Unit of Measure for the item.
  • _BarcodeListToReturn: You can modify this by adding values separated with a semicolon.

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::CodeunitCodeunit::"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;


Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "example" and label = "OnPostAdhocRegistrationOnItemCrossReference_OnBeforeInsertItemCrossReference"

...

VersionChanges
MOB5.24Introduced
MOB5.53UoMCode parameter added