Versions Compared

Key

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

Use this event to

Excerpt

Change or Amend the BarcodeList generated by the GetItemCrossRefList procedure.

...

You can use the event to override the standard functionality by changing or amending the _BarcodeList BarcodeListToReturn variable.



Template

[EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Toolbox", 'OnAfterGetItemCrossRefList''', true, true)]
procedure OnAfterGetItemCrossRefList(_ItemNo: Code[20]; _VariantCode: Code[10]; var _BarcodeListBarcodeListToReturnText)
begin
end;

Example: Add Item GTIN to _BarcodeList

[EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Toolbox", 'OnAfterGetItemCrossRefList''', true, true)]
procedure MyOnAfterGetItemCrossRefList(_ItemNo: Code[20]; _VariantCode: Code[10]; var _BarcodeListBarcodeListToReturnText)
var
    Item: Record Item;
begin
    if Item.Get(_ItemNo) and (Item.GTIN <> ''then
        if _BarcodeList BarcodeListToReturn '' then
            _BarcodeListBarcodeListToRetun := Item.GTIN
        else
            _BarcodeListBarcodeListToReturn += ';' + Item.GTIN;
end;

Version History

VersionChanges
MOB5.13Introduced

...