ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 99000772 - "Production BOM Line" - OnBeforeGetBOMLineQtyPerUOM

Open UIBKH opened this issue 3 years ago • 1 comments

Dear Support,

We would like to add a new event OnBeforeGetBOMLineQtyPerUOM in the following Procedure below, using the IsHandled pattern. This would allow us to further customize the code and migrate existing customizations.

procedure GetBOMLineQtyPerUOM(Item: Record Item): Decimal
var
    ItemUnitOfMeasure: Record "Item Unit of Measure";
    UOMMgt: Codeunit "Unit of Measure Management";
    IsHandled: Boolean;  //New  Code --++
begin
    //New  Code --
    IsHandled := false;
    OnBeforeGetBOMLineQtyPerUOM(Rec, Item, IsHandled);
    if IsHandled then
    exit;
    //New  Code ++
    if "No." = '' then
        exit(1);

    if not ItemUnitOfMeasure.Get(Item."No.", "Unit of Measure Code") then
        Error(BOMLineUOMErr, "Unit of Measure Code", Item."No.", "Production BOM No.", "Version Code", "Line No.");
    exit(UOMMgt.GetQtyPerUnitOfMeasure(Item, "Unit of Measure Code"));
end;

Event signature:

[IntegrationEvent(false, false)]
local procedure OnBeforeGetBOMLineQtyPerUOM(var ProductionBOMLine: Record "Production BOM Line"; Item: Record Item; var IsHandled: Boolean)
begin
end;

UIBKH avatar Feb 03 '23 08:02 UIBKH

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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 53020.

JesperSchulz avatar Feb 09 '23 06:02 JesperSchulz