Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Use this event to

Filter Warehouse Shipments to be displayed at the mobile device for lookup "OnPostShipment".

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", 'OnLookupOnPostShipment_OnSetFilterWarehouseShipment''', true, true)]
    local procedure OnLookupOnPostShipment_OnSetFilterWarehouseShipment(var _RequestValues: Record "MOB NS Request Element"; var _WhseShipmentHeader: Record "Warehouse Shipment Header"; var _WhseShipmentLine: Record "Warehouse Shipment Line")
    begin
    end;


Example 1

    // [Example 01] Do not allow mobile user to handle shipments lines over a certain weight when no special equipment is used (but still ship remaining lines)
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Lookup", 'OnLookupOnPostShipment_OnSetFilterWarehouseShipment''', true, true)]
    local procedure My01OnLookupOnPostShipment_OnSetFilterWarehouseShipment(var _RequestValues: Record "MOB NS Request Element"; var _WhseShipmentHeader: Record "Warehouse Shipment Header"; var _WhseShipmentLine: Record "Warehouse Shipment Line")
    var
        MyCustomEquipmentText: Text;
    begin
        MyCustomEquipmentText := _RequestValues.GetValue('MyCustomEquipmentField');   // New custom field in headerconfiguration used by the lookup page
        if MyCustomEquipmentText = 'No special equipment' then
            _WhseShipmentLine.SetRange(Weight, 025);
    end;

Example 2

    // [Example 02] Exclude Warehouse Shipments that has comments
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Lookup", 'OnLookupOnPostShipment_OnSetFilterWarehouseShipment''', true, true)]
    local procedure My02OnLookupOnPostShipment_OnSetFilterWarehouseShipment(var _RequestValues: Record "MOB NS Request Element"; var _WhseShipmentHeader: Record "Warehouse Shipment Header"; var _WhseShipmentLine: Record "Warehouse Shipment Line")
    begin
        _WhseShipmentHeader.SetRange(Comment, false);
    end;


More examples

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


Version History

Version

Changes

MOB5.21Introduced
  • No labels