Info | ||
---|---|---|
| ||
|
...
// [Template]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"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::Codeunit, Codeunit::"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) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...