ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] codeunit 5870 "Calculate BOM Tree" - OnGenerateProdCompSubTreeOnBeforeRoutingLineLoop

Open aobsgit opened this issue 4 years ago • 1 comments

Hi

Could you please add Ishandled pattern to this event? Thank you

OLD CODE

.
.
.
if RoutingLine.ReadPermission then
            with RoutingLine do
                if (TreeType in [TreeType::" ", TreeType::Cost]) and
                   CertifiedRoutingVersionExists(ParentItem."Routing No.", WorkDate)
                then begin
                    repeat
                        OnGenerateProdCompSubTreeOnBeforeRoutingLineLoop(RoutingLine, BOMBuffer);
                        if "No." <> '' then begin
                            BOMBuffer.SetLocationVariantFiltersFrom(ItemFilter);
                            BOMBuffer.TransferFromProdRouting(
.
.
.
[IntegrationEvent(false, false)]
local procedure OnGenerateProdCompSubTreeOnBeforeRoutingLineLoop(var RoutingLine: Record "Routing Line"; var BOMBuffer: Record "BOM Buffer")
begin
end;

NEW CODE

.
.
.
if RoutingLine.ReadPermission then
            with RoutingLine do
                if (TreeType in [TreeType::" ", TreeType::Cost]) and
                   CertifiedRoutingVersionExists(ParentItem."Routing No.", WorkDate)
                then begin
                    repeat
                        IsHandled := false;
                        OnGenerateProdCompSubTreeOnBeforeRoutingLineLoop(RoutingLine, BOMBuffer, IsHandled);
                        if not IsHandled then
                            if "No." <> '' then begin
                                BOMBuffer.SetLocationVariantFiltersFrom(ItemFilter);
                                BOMBuffer.TransferFromProdRouting(
.
.
.
[IntegrationEvent(false, false)]
local procedure OnGenerateProdCompSubTreeOnBeforeRoutingLineLoop(var RoutingLine: Record "Routing Line"; var BOMBuffer: Record "BOM Buffer"; var IsHandled: Boolean)
begin
end;

aobsgit avatar Apr 20 '22 08:04 aobsgit

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.

JesperSchulz avatar Apr 24 '22 06:04 JesperSchulz