OnLookupOnLocateItem_OnSetFilterBinContent

Use this event to

Filter Bin Content to be displayed at the mobile device for "LocateItem".

Description

This event affects locations with Location."Bin Mandatory" = true.

For locations with no Bin Content consider using the OnLookupOnLocateItem_OnIncludeItem-event.

If you wish to implement same conditions for locations with- and without BinContent you must subscribe to this event but also to OnLookupOnLocateItem_OnIncludeItem-event.

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Lookup", 'OnLookupOnLocateItem_OnSetFilterBinContent''', true, true)]
    local procedure OnLookupOnLocateItem_OnSetFilterBinContent(var _RequestValues: Record "MOB NS Request Element"; var _BinContent: Record "Bin Content")
    begin
    end;


Example

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Lookup", 'OnLookupOnLocateItem_OnSetFilterBinContent''', true, true)]
    local procedure MyOnLookupOnLocateItem_OnSetFilterBinContent(var _RequestValues: Record "MOB NS Request Element"; var _BinContent: Record "Bin Content")
    var
        MyCustomShowQuantityText: Text;
    begin
        MyCustomShowQuantityText := _RequestValues.GetValue('MyCustomShowQuantityField');   // New custom field in headerconfiguration used by the lookup page
        if MyCustomShowQuantityText = 'Only with inventory' then
            _BinContent.SetFilter(Quantity, '>=0')// Include only fixed bins with inventory on hand
    end;


More examples

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


Version History

Version

Changes

MOB5.19Introduced
MOB5.21Added parameter _RequestValues