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::Codeunit, Codeunit::"MOB WMS Put AwayMOB WMS Ship", 'OnGetPutAwayOrdersOnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader', '', true, true)]
procedure OnGetPutAwayOrders OnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader(_WhseActHeaderWhseShipmentHeader: Record "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::Codeunit, Codeunit::"MOB WMS Put AwayMOB WMS Ship", 'OnGetPutAwayOrdersOnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader', '', true, true)]
procedure MyOnGetPutAwayOrders OnGetShipOrders_OnIncludeWarehouseActivityHeaderOnIncludeWarehouseShipmentHeader(_WhseActHeaderWhseShipmentHeader: Record "Warehouse Activity HeaderWarehouse Shipment Header"; var _IncludeInOrderList: Boolean)
var
WhseShipmentLine: PurchaseHeaderRecord "Warehouse Shipment Line";
SalesHeader: Record "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::All) then
_IncludeInOrderList := false;
end;
until (WhseShipmentLine.Next() = 0) or not _IncludeInOrderList := false;
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...