OnGetAssemblyOrders_OnIncludeAssemblyHeader
Use this event to
Add filter conditions for Assembly Headers that cannot be solved by OnSetFilter-event.
Description
This event is triggered after filters have been applied to Assembly Header. The event should be used only when it is not possible to use OnSetFilter-event to solve if the assembly should be included in the OrderList response.
The assemblies can be excluded from the OrderList response by setting the parameter _IncludeInOrderList to false.
See also: OnGetAssemblyOrders_OnSetFilterAssemblyHeader
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Assembly", 'OnGetAssemblyOrders_OnIncludeAssemblyHeader', '', true, true)]
local procedure OnGetAssemblyOrders_OnIncludeAssemblyHeader(_AssemblyHeader: Record "Assembly Header"; var _IncludeInOrderList: Boolean)
begin
end;
Example
// [Example] Hide Assembly Orders if Bin Mandatory but assigned 'Output' Bin Code is blocked for movement
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Assembly", 'OnGetAssemblyOrders_OnIncludeAssemblyHeader', '', true, true)]
local procedure MyOnGetAssemblyOrders_OnIncludeAssemblyHeader(_AssemblyHeader: Record "Assembly Header"; var _IncludeInOrderList: Boolean)
var
Location: Record Location;
Bin: Record Bin;
begin
if Location.Get(_AssemblyHeader."Location Code") and (Location."Bin Mandatory") then
if Bin.Get(_AssemblyHeader."Location Code", _AssemblyHeader."Bin Code") then
if Bin."Block Movement" in [Bin."Block Movement"::All, Bin."Block Movement"::Inbound] 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.24 | Introduced |