2
We are in the process of upgrading a customer to BC - Release 2 and we are stuck with out the ability to create new integration event in codeunit 7306. Can you please add an "OnBeforeRegister" event as shown in the attached example on to the standard extension and give a release to continue our work. Please see attachment for detail. All the necessary change are marked as "//K3 New"
Category: Development
STATUS DETAILS
Declined
Ideas Administrator

Thank you for your event request, and suggested code, however, please log it at the dedicated site for this

Your help is greatly appreciated,
Business Central Team

Comments

R

codeunit 77000 "K3Whse.-Act.-Register (Yes/No)"
{
TableNo = "Warehouse Activity Line";

trigger OnRun()
begin
WhseActivLine.Copy(Rec);
Code;
Copy(WhseActivLine);
end;

var
Text001: Label 'Do you want to register the %1 Document?';
WhseActivLine: Record "Warehouse Activity Line";
WhseActivityRegister: Codeunit "Whse.-Activity-Register";
WMSMgt: Codeunit "WMS Management";
Text002: Label 'The document %1 is not supported.';
Handled: Boolean; //K3 New +-

local procedure "Code"()
begin
OnBeforeCode(WhseActivLine);

with WhseActivLine do begin
if ("Activity Type" = "Activity Type"::"Invt. Movement") and
not ("Source Document" in ["Source Document"::" ",
"Source Document"::"Prod. Consumption",
"Source Document"::"Assembly Consumption"])
then
Error(Text002, "Source Document");

WMSMgt.CheckBalanceQtyToHandle(WhseActivLine);

if not Confirm(Text001, false, "Activity Type") then
exit;

//K3 New -
OnBeforeRegister(WhseActivLine, Handled);
If not Handled then begin
//K3 New +
WhseActivityRegister.Run(WhseActivLine);
Clear(WhseActivityRegister);
end; //K3 New +-
end;

OnAfterCode(WhseActivLine);
end;

[IntegrationEvent(false, false)]
local procedure OnAfterCode(var WarehouseActivityLine: Record "Warehouse Activity Line")
begin
end;

//K3 New -
[IntegrationEvent(false, false)]
local procedure OnBeforeRegister(var WarehouseActivityLine: Record "Warehouse Activity Line"; Var Handled: Boolean)
begin
end;
//K3 New +

}

Category: Development