Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Use this event to

Excerpt

Exclude specific Consumption lines from being displayed at mobile device.

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.

See also: WIP Assembly OnGetProdConsumptionLinesOnGetAssemblyOrderLines_OnSetFilterProdOrderComponentOnSetFilterAssemblyLine

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production ConsumptionMOB WMS Assembly", 'OnGetProdConsumptionLinesOnGetAssemblyOrderLines_OnIncludeProdOrderComponentOnIncludeAssemblyLine''', true, true)]
    local procedure OnGetProdConsumptionLines OnGetAssemblyOrderLines_OnIncludeProdOrderComponentOnIncludeAssemblyLine(_ProdOrderComponentAssemblyLineRecord "Prod. Order ComponentAssembly Line"; 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)
    // 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::CodeunitCodeunit::"MOB WMS Production ConsumptionMOB WMS Assembly", 'OnGetProdConsumptionLinesOnGetAssemblyOrderLines_OnIncludeProdOrderComponentOnIncludeAssemblyLine''', true, true)]
    local procedure MyOnGetProdConsumptionLines MyOnGetAssemblyOrderLines_OnIncludeProdOrderComponentOnIncludeAssemblyLine(_ProdOrderComponentAssemblyLineRecord "Prod. Order ComponentAssembly Line"; var _IncludeInOrderLines: Boolean)
    var
        RemainingQty        ResourceDecimal;
        RemainingQtyBase: Decimal;
    begin
        _ProdOrderComponent.GetRemainingQty(RemainingQty, RemainingQtyBase);
        if RemainingQty = 0 thenRecord Resource;
    begin
        if _AssemblyLine.Type = _AssemblyLine.Type::Resource then begin
            _AssemblyLine.TestField("No.");
            Resource.Get(_AssemblyLine."No.");
            _IncludeInOrderLines := false_IncludeInOrderLines and (Resource.Type <> Resource.Type::Machine);
        end;
    end;



Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "production" and label = "example" and label = "oninclude"

  

Version History

VersionChanges
MOB5.2224Introduced