ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 99000772 - "Production BOM Line" - OnBeforeGetBOMLineQtyPerUOM
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;
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.