OnGetAssemblyOrderLines_OnSetFilterAssemblyLine
Use this event to
Filter Assembly Lines to be displayed at the mobile device ('Consumption').
Description
Affects which elements for consumption is displayed (lines derived from Assembly Line table).
With this event you can perform basic record filtering.
Default behavior is only lines of type 'Item' is displayed. Text lines and Resource Lines are excluded at the mobile device, but can be enabled using customization (see examples below).
Hidden Resource lines will be posted automatically and proportionally to each partial Quantity To Assemble.
Displayed Item lines MUST be fully registered for each partial Quantity To Assemble meaning default Over-/UnderDelivery 'Blocked' should NOT be changed/customized in the OrderLines list.
See also: OnGetAssemblyOrderLines_OnIncludeAssemblyLine
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine', '', true, true)]
local procedure OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
begin
end;
Example: Include Text lines and Item lines from the Assembly Lines, but still exclude Resource lines
// [Example 01]
// Include Text lines and Item lines from the Assembly Lines, but still exclude Resource lines
//
// Hidden Resource lines will be posted automatically and proportionally to each partial Quantity To Assemble
//
// Displayed Item lines MUST be fully registered for each partial Quantity To Assemble meaning
// default Over-/UnderDelivery 'Blocked' should NOT be changed/customized at the 'Consumption' lines.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine', '', true, true)]
local procedure My01OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
begin
_AssemblyLine.SetFilter(Type, '%1|%2', _AssemblyLine.Type::" ", _AssemblyLine.Type::Item);
end;
Example: Include Resource Lines and Item Lines
// [Example 02]
// Include Resource Lines and Item Lines
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine', '', true, true)]
local procedure My02OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
begin
_AssemblyLine.SetFilter(Type, '%1|%2', _AssemblyLine.Type::Resource, _AssemblyLine.Type::Item);
end;
Example: Include all lines (Text Lines, Resource Lines and Item Lines)
// [Example 03]
// Include all lines (Text Lines, Resource Lines and Item Lines)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine', '', true, true)]
local procedure My03OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
begin
_AssemblyLine.SetRange(Type);
end;
More examples
-
Case: Filter Bin Content for specific Serial No. — Filter Lookup Bin Content for a specific Serial No.
-
Case: Filter Inventory Movements of Asmbl. Orders for specific Sales Order — The user wants to filter Warehouse Documents on specific Sales Order number, using the existing Planned Movements function.
-
How-to: Filter Order Lines — Examples of filtering Order Lines .
-
How-to: Filter Orders — Examples for including/excluding orders using basic filtering
-
How-to: Filter Orders - Complex — Examples for including/excluding orders using complex per-document filtering
-
How-to: Search - Add new HeaderField to existing SearchType — Add a new custom HeaderField to the existing "magnifying glass" SearchType 'ItemSearch' and show a simple search response.
Version History
Version | Changes |
---|---|
MOB5.24 | Introduced |