OnGetProdOrderLines_OnIncludeProdOrderLine
Use this event to
Add filter conditions for Production Order Lines that cannot be solved by OnSetFilter-event.
Description
This event is triggered after filters have been applied to the Production Order Lines. The event should be used only when it is not possible to use OnSetFilter-event to solve if the Prod. Order Lines should be included in the OrderList response.
The Production Order Lines can be excluded from the OrderList response by setting the parameter _IncludeInOrderList to false.
See also: OnGetProdOrderLines_OnSetFilterProdOrderLine
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production Consumption", 'OnGetProdOrderLines_OnIncludeProdOrderLine', '', true, true)]
local procedure OnGetProdOrderLines_OnIncludeProdOrderLine(_ProdOrderLine: Record "Prod. Order Line"; var _IncludeInOrderList: Boolean)
begin
end;
Example
// [Example] Hide Production Order Lines if assigned bin code is blocked for movement
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production Consumption", 'OnGetProdOrderLines_OnIncludeProdOrderLine', '', true, true)]
local procedure MyOnGetProdOrderLines_OnIncludeProdOrderLine(_ProdOrderLine: Record "Prod. Order Line"; var _IncludeInOrderList: Boolean)
var
Bin: Record Bin;
begin
if (_ProdOrderLine."Bin Code" <> '') and (Bin.Get(_ProdOrderLine."Location Code", _ProdOrderLine."Bin Code")) and (Bin."Block Movement" <> Bin."Block Movement"::" ") then
_IncludeInOrderList := false;
end;
More examples
-
Case: Filter Receipts based on Comments — The user wants to filter Receipts on whether they have comments or not
-
How-to: Filter Order Lines — Examples of filtering Order Lines .
-
How-to: Filter Orders - Complex — Examples for including/excluding orders using complex per-document filtering
Version History
Version | Changes |
---|---|
MOB5.22 | Introduced |