Versions Compared

Key

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

Use this event to

Excerpt

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

...

You can use the event to override the standard functionality by changing or appending to the _BarcodeListToReturn variable.


Template

    // [Template

...

TODO]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnAfterGetBarcodeList''', true, true)]
    local procedure OnAfterGetBarcodeList(_ItemNo: Code[20]; _VariantCode: Code[10]; var _BarcodeListToReturn: Text)
    begin
    end;

Example: Add Item GTIN to _BarcodeListToReturn

...

    // [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]; 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"

...