Versions Compared

Key

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

Use this event to

...

If you wish to implement conditions that cannot be solved with this event you may subscribe OnLookupOnLocateItemOnLookupOnPostShipment_OnIncludeItemOnIncludeWarehouseShipment-event instead.

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;


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

...