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

...

Excerpt

Modify filters used for searching in Item Reference table.



Used by Unplanned Functions

...

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnSearchItemReferenceOnAfterSetFilters''', true, true)]
    local procedure OnSearchItemReferenceOnAfterSetFilters(_ScannedBarcode: Code[50]; var _ItemReference: Record "Item Reference")
    begin
    end;

Example

    // [Example]: Change filter on Cross-Reference Type to also include Customer and Vendor references
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnSearchItemReferenceOnAfterSetFilters''', true, true)]
    local procedure MyOnSearchItemReferenceOnAfterSetFilters(_ScannedBarcode: Code[50]; var _ItemReference: Record "Item Reference")
    begin
        _ItemReference.SetFilter("Reference Type", '%1|%2|%3', _ItemReference."Reference Type"::"Bar Code", _ItemReference."Reference Type"::Customer, _ItemReference."Reference Type"::Vendor);
    end;


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

...