Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Current »

System requirements

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

Use this event to

Replace or extend standard Mobile WMS logic for searching for Item Cross Reference / Item Reference.

This event is implemented in the "MOB Item Reference Mgt." codeunit, but may be used for replacing or extending logic for "Item Cross Reference" as well (since no table is referenced in the event parameters).

Used by Unplanned Functions

See also: OnBeforeSearchItemCrossRef (MOB5.13-MOB5.23)


Template

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnBeforeSearchItemReference''', true, true)]
    local procedure OnBeforeSearchItemReference(_ScannedBarcode: Code[50]; var _ReturnItemNo: Code[20]; var _ReturnVariantCode: Code[10]; 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)

    // [Example]: If Item is found by filtering on GTIN then do not search through Item References
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnBeforeSearchItemReference''', true, true)]
    local procedure MyOnBeforeSearchItemReference(_ScannedBarcode: Code[50]; var _ReturnItemNo: Code[20]; var _ReturnVariantCode: Code[10]; var _IsHandled: Boolean)
    var
        Item: Record Item;
    begin
        Item.SetRange(GTIN, _ScannedBarcode);
        if Item.FindFirst() then begin
            _ReturnItemNo := Item."No.";
            _IsHandled := true;
        end;
    end;


More examples

There are no items with the selected labels at this time.


Version History

Version

Changes

MOB5.24Introduced
  • No labels