Skip to content

[Event Request] Codeunit 99000765 "Mfg. Whse. Activity Register" #29694

@Mariangela-DeMaio-EOS

Description

@Mariangela-DeMaio-EOS

Why do you need this change?

Hi,
i need an event at the end of procedure "UpdateProdOrderLine" of codeunit 99000765 "Mfg. Whse. Activity Register" to modify custom fields on ProdOrderLine Record.

Describe the request

Add an event at the end of procedure "UpdateProdOrderLine" of codeunit 99000765 "Mfg. Whse. Activity Register".

`

 local procedure UpdateProdOrderLine(WarehouseActivityLine: Record "Warehouse Activity Line")
var
    ProdOrderLine: Record "Prod. Order Line";
    xProdOrderLine: Record "Prod. Order Line";
begin
    ProdOrderLine.Get(WarehouseActivityLine."Source Subtype", WarehouseActivityLine."Source No.", WarehouseActivityLine."Source Line No.");
    xProdOrderLine := ProdOrderLine;

    ProdOrderLine."Qty. Put Away (Base)" :=
      ProdOrderLine."Qty. Put Away (Base)" + WarehouseActivityLine."Qty. to Handle (Base)";
    if WarehouseActivityLine."Qty. per Unit of Measure" = ProdOrderLine."Qty. per Unit of Measure" then
        ProdOrderLine."Qty. Put Away" := ProdOrderLine."Qty. Put Away" + WarehouseActivityLine."Qty. to Handle"
    else
        ProdOrderLine."Qty. Put Away" :=
          Round(ProdOrderLine."Qty. Put Away" + WarehouseActivityLine."Qty. to Handle (Base)" / WarehouseActivityLine."Qty. per Unit of Measure");
    ProdOrderLine."Put-away Status" := ProdOrderLine.GetLinePutAwayStatus();

    if (ProdOrderLine."Qty. Put Away (Base)" <> xProdOrderLine."Qty. Put Away (Base)") or
       (ProdOrderLine."Qty. Put Away" <> xProdOrderLine."Qty. Put Away") or
       (ProdOrderLine."Put-away Status" <> xProdOrderLine."Put-away Status")
    then
        ProdOrderLine.Modify();


       // New Event

     OnAfterUpdateProdOrderLine(ProdOrderLine, xProdOrderLine, WarehouseActivityLine);


end;

`

`

     [IntegrationEvent(false, false)]
local procedure OnAfterUpdateProdOrderLine(var ProdOrderLine: Record "Prod. Order Line";  xProdOrderLine: Record "Prod. Order Line"; WarehouseActivityLine: Record "Warehouse Activity Line")
begin
end;

`
Internal work item: AB#621608

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions