-
Notifications
You must be signed in to change notification settings - Fork 688
Open
Labels
SCMGitHub request for SCM areaGitHub request for SCM areaevent-requestRequest for adding an eventRequest for adding an event
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SCMGitHub request for SCM areaGitHub request for SCM areaevent-requestRequest for adding an eventRequest for adding an event