Versions Compared

Key

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

Use this event to

Excerpt

Add filter conditions for Warehouse Activity Headers that cannot be solved by OnSetFilter-event.

...

The Warehouse Activity Header can be excluded from the OrderList response by setting the parameter _IncludeInOrderList to false.


Template

 [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Put AwayMOB WMS Ship", 'OnGetPutAwayOrdersOnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader''', true, true)]
    procedure OnGetPutAwayOrders OnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader(_WhseActHeaderWhseShipmentHeaderRecord "Warehouse Activity HeaderWarehouse Shipment Header"; var _IncludeInOrderList: Boolean)
    begin
    end;


Example: Don't include Invt. Picks when the source doc.(Purchase Order) is not released.

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Put AwayMOB WMS Ship", 'OnGetPutAwayOrdersOnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader''', true, true)]
    procedure MyOnGetPutAwayOrders OnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader(_WhseActHeaderWhseShipmentHeaderRecord "Warehouse Activity HeaderWarehouse Shipment Header"; var _IncludeInOrderList: Boolean)
    var
        WhseShipmentLine:    PurchaseHeaderRecord "Warehouse Shipment Line";
        SalesHeaderRecord "Purchase HeaderSales Header";
        Customer: Record Customer;
    begin
    if (_WhseActHeader.Type = _WhseActHeader.Type::"Invt. Put-away") and (_WhseActHeader        if WhseShipmentLine.FindSet() then
            repeat
                if WhseShipmentLine."Source Document" = _WhseActHeader WhseShipmentLine."Source Document"::"Purchase OrderSales Order") then
        if PurchaseHeader begin
                    SalesHeader.Get(_WhseActHeaderWhseShipmentLine."Source Subtype", _WhseActHeader WhseShipmentLine."Source No.") and (PurchaseHeader.Status < PurchaseHeader.Status::Released;
                    if Customer.Get(SalesHeader."Sell-to Customer No.") and not (Customer.Blocked < Customer.Blocked::Allthen
                        _IncludeInOrderList := false;
                end;
            until (WhseShipmentLine.Next() = 0) or not _IncludeInOrderList := false;
    end;


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

...