OnGetProdConsumptionLines_OnIncludeProdOrderComponent
Use this event to
Exclude specific Consumption lines from being displayed at mobile device (that cannot be solved by OnSetFilter-event).
Description
You may use the event to exclude specific Production Journal, Type::Consumption lines from being displayed at the mobile device. This event is triggered after filters have been applied to the Prod. Order Component Line.
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 Prod. Order Component can be excluded from the lines response by setting the parameter _IncludeInOrderLines to false.
Learn about Basic vs. Complex filtering
See also: OnGetProdConsumptionLines_OnSetFilterProdOrderComponent
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production Consumption", 'OnGetProdConsumptionLines_OnIncludeProdOrderComponent', '', true, true)]
local procedure OnGetProdConsumptionLines_OnIncludeProdOrderComponent(_ProdOrderComponent: Record "Prod. Order Component"; var _IncludeInOrderLines: Boolean)
begin
end;
Example
// [Example] Hide fully consumed items (standard will allow further consumption even when item is fully consumed accordingly to the BOM)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production Consumption", 'OnGetProdConsumptionLines_OnIncludeProdOrderComponent', '', true, true)]
local procedure MyOnGetProdConsumptionLines_OnIncludeProdOrderComponent(_ProdOrderComponent: Record "Prod. Order Component"; var _IncludeInOrderLines: Boolean)
var
RemainingQty: Decimal;
RemainingQtyBase: Decimal;
begin
_ProdOrderComponent.GetRemainingQty(RemainingQty, RemainingQtyBase);
if RemainingQty = 0 then
_IncludeInOrderLines := 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 |