Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Use this event to

Excerpt

Override SearchItemCrossRef procedure.

...

Replaced by: MobItemReferenceMgt - OnBeforeSearchItemReference  (MOB5.23 24 or newer)


Description

This event is triggered in procedure SearchItemCrossRef. The procedure is used to find and return Item No. and Variant Code from a scanned Barcode by searching the Item Cross Reference table.

You can use the event to override the standard functionality by setting the _ItemNumberToReturn and _VariantCodeToReturn variables and setting the parameter _Handled to true.

Template

[EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Toolbox", 'OnBeforeSearchItemCrossRef''', true, true)]
procedure OnBeforeSearchItemCrossRef(_ScannedBarcode: Code[2050]; var _VariantCodeToReturn: Code[10]; var _ItemNumberToReturn: Code[20]; var _IsHandled: Boolean)
begin
end;

Example:

...

Search for Item Number by Item.GTIN and search with higher priority than Item Cross References
(note: Searching for GTIN is a standard feature since MOB5.24 an no longer needs a customization in newer versions)

[EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Toolbox", 'OnBeforeCheckCrossRef''', true, true)]
procedure OnBeforeSearchItemCrossRef(_ScannedBarcode: Code[2050]; var _VariantCodeToReturn: Code[10]; var _ItemNumberToReturn: Code[20]; var _IsHandled: Boolean)
var
    Item: Record Item;
begin
    Item.SetRange(GTIN, _ScannedBarcode);
    if Item.FindFirst() then begin
        _ItemNumberToReturn := Item."No.";
        _IsHandled := true;
    end;
end;

Version History

VersionChanges
MOB5.13Introduced
MOB5.2324Deprecated, moved to MobItemReferenceMgt - OnBeforeSearchItemReference

...