ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 7306 OnBeforeRegister(WhseActivLine, IsHandled);

Open Rama-M opened this issue 6 years ago • 2 comments

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"

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 +

}

Rama-M avatar Jan 01 '20 12:01 Rama-M

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Jan 17 '20 16:01 bc-ghost

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Jan 27 '20 11:01 bc-ghost