Use this event to
Exclude specific Assembly Lines from being displayed at mobile device ('Consumption') that cannot be solved by OnSetFilter-event.
Description
You may use the event to exclude specific elements for consumption from being displayed at the mobile device. This event is triggered after filters have been applied to the Assemble Line table.
The event should be used only when it is not possible to use OnSetFilter-event to solve if the Line should be included in the OrderLines response.
The Assembly Line can be excluded from the lines response by setting the parameter _IncludeInOrderLines to false.
See also: OnGetAssemblyOrderLines_OnSetFilterAssemblyLine
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnIncludeAssemblyLine', '', true, true)]
local procedure OnGetAssemblyOrderLines_OnIncludeAssemblyLine(_AssemblyLine: Record "Assembly Line"; var _IncludeInOrderLines: Boolean)
begin
end;
Example
// [Example]
// Hide Machine resources from the 'Consumption' Assembly Lines
//
// Hidden lines will be posted automatically and proportionally to each partial Quantity To Assemble
//
// Displayed 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_OnIncludeAssemblyLine', '', true, true)]
local procedure MyOnGetAssemblyOrderLines_OnIncludeAssemblyLine(_AssemblyLine: Record "Assembly Line"; var _IncludeInOrderLines: Boolean)
var
Resource: Record Resource;
begin
if _AssemblyLine.Type = _AssemblyLine.Type::Resource then begin
_AssemblyLine.TestField("No.");
Resource.Get(_AssemblyLine."No.");
_IncludeInOrderLines := _IncludeInOrderLines and (Resource.Type <> Resource.Type::Machine);
end;
end;
More examples
There are no items with the selected labels at this time.
Version History
Version | Changes |
---|---|
MOB5.24 | Introduced |