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

Use this event to

...

    // [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

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


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


Version History

Version

Changes

MOB5.2624Introduced