Versions Compared

Key

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

Use this event to

Excerpt

Add filter conditions for Bin Content that cannot be solved by OnSetFilter-event. 

...

This event is triggered after filters have been applied to the Bin Content.  The The event should be used only when it is not possible to use OnLookupOnLocateItem OnLookupOnBinContent_OnSetFilterBinContent-event to solve if the Bin Content should be included in the response.

...

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnBinContent_OnIncludeBinContent', '', true, true)]
    localprocedure OnLookupOnBinContent_OnIncludeBinContent(_BinContent: Record "Bin Content"; var _IncludeInLookup: Boolean)
    begin
    end;

Example 01: Do not include in response if item is blocked

    // [Example 01]: Do not include in Exclude from response if item is blocked
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnBinContent_OnIncludeBinContent', '', true, true)]
    localprocedure My01OnLookupOnBinContent_OnIncludeBinContent(_BinContent: Record "Bin Content"; var _IncludeInLookup: Boolean)
    var
        Item: Record Item;
    begin
        if Item.Get(_BinContent."Item No.") and Item.Blocked then
            _IncludeInLookup := false;
    end;

Example 02: Combine OnSetFilter and OnInclude events to display all fixed bins but floating bins only with inventory

    // [Example 02]: Combine   Combination of OnSetFilter and OnInclude -events to display . Display all fixed bins, but only floating bins only with inventory

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnBinContent_OnSetFilterBinContent', '', true, true)]
    localprocedure My02OnLookupOnBinContent_OnSetFilterBinContent(var _RequestValues: Record "MOB NS Request Element"; var _BinContent: Record "Bin Content")
    begin
        _BinContent.SetRange(Quantity); // Include all Bin Content records regardsless regardless of Quantity on hand
    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnBinContent_OnIncludeBinContent', '', true, true)]
    local procedure My02OnLookupOnBinContent_OnIncludeBinContent(_BinContent: Record "Bin Content"; var _IncludeInLookup: Boolean)
    begin
        _IncludeInLookup := _IncludeInLookup and ((_BinContent.Quantity <> 0) or _BinContent.Fixed);   // Exclude floating bins with no inventory
    end;


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

Version History

Version

Changes

MOB5.34Introduced