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 (or newer)

Use this event to

Excerpt

Override lists of barcodes returned for an item in a semi-colon separated format.

...

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnBeforeGetBarcodeList''', true, true)]
    local procedure OnBeforeGetBarcodeList(_ItemNo: Code[20]; _VariantCode: Code[10]; var _BarcodeListToReturn: Textvar _IsHandled: Boolean)
    begin
    end;

Example

    // [Example]: Add Item GTIN to _BarcodeList
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnBeforeGetBarcodeList''', true, true)]
    local procedure MyOnBeforeGetBarcodeList(_ItemNo: Code[20]; _VariantCode: Code[10]; var _BarcodeListToReturn: Textvar _IsHandled: Boolean)
    var
        Item: Record Item;
    begin
        // Intentionally do not exit here if _IsHandled but always add GTIN to BarcodeList

        if Item.Get(_ItemNothen
            if _BarcodeListToReturn = '' then
                _BarcodeListToReturn := Item.GTIN
            else
                _BarcodeListToReturn += ';' + Item.GTIN;

        _IsHandled := true;
    end;


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

...