OnGetProdConsumptionLines_OnSetFilterProdOrderComponent
Use this event to
Filter Production Consumption Lines to be displayed at the mobile device.
Description
Affects which Production Consumption Lines are displayed (lines from Prod. Order Component table).
With this event you can perform basic record filtering.
See also: OnGetProdConsumptionLines_OnIncludeProdOrderComponent
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production Consumption", 'OnGetProdConsumptionLines_OnSetFilterProdOrderComponent', '', true, true)]
local procedure OnOnGetProdConsumptionLines_OnSetFilterProdOrderComponent(var _ProdOrderComponent: Record "Prod. Order Component")
begin
end;
Example
// [Example]
//
// Hide components if they require picking but nothing is picked yet (partially or fully)
// Will show warning at Mobile Device if the list empty
//
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production Consumption", 'OnGetProdConsumptionLines_OnSetFilterProdOrderComponent', '', true, true)]
local procedure MyOnGetProdConsumptionLines_OnSetFilterProdOrderComponent(var _ProdOrderComponent: Record "Prod. Order Component")
var
Location: Record Location;
ProdOrderLine: Record "Prod. Order Line";
RequirePicking: Boolean;
begin
if _ProdOrderComponent."Location Code" <> '' then
RequirePicking := Location.RequirePicking(_ProdOrderComponent."Location Code")
else begin
ProdOrderLine.Get(_ProdOrderComponent.Status, _ProdOrderComponent."Prod. Order No.", _ProdOrderComponent."Prod. Order Line No.");
RequirePicking := Location.RequirePicking(ProdOrderLine."Location Code")
end;
if RequirePicking then
_ProdOrderComponent.SetFilter("Qty. Picked", '<>0');
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.22 | Introduced |