Event Request: codeunit 905 "Assembly Line Management" OnBeforeReplaceLinesFromBOM
Hi
Please could we have the following event added, this will allow us to change the condition to replace the ASM lines: codeunit 905 "Assembly Line Management" procedure UpdateAssemblyLines() NoOfLinesFound := CopyAssemblyData(AsmHeader, TempAssemblyHeader, TempAssemblyLine); OnUpdateAssemblyLinesOnAfterCopyAssemblyData(TempAssemblyLine, ReplaceLinesFromBOM); if ReplaceLinesFromBOM then begin TempAssemblyLine.DeleteAll(); //if not ((AsmHeader."Quantity (Base)" = 0) or (AsmHeader."Item No." = '')) then begin // condition to replace asm lines Continue := not ((AsmHeader."Quantity (Base)" = 0) or (AsmHeader."Item No." = '')); // condition to replace asm lines OnBeforeReplaceLinesFromBOM(AsmHeader,Continue); if Continue then begin IsHandled := false; OnBeforeReplaceAssemblyLines(AsmHeader, TempAssemblyLine, IsHandled); if not IsHandled then begin SetLinkToBOM(AsmHeader, BOMComponent);
[IntegrationEvent(false, false)]
local procedure OnBeforeReplaceLinesFromBOM(AsmHeader: Record "Assembly Header";var Continue: Boolean)
begin
end;
There is already OnBeforeReplaceAssemblyLines in almost exact same place, why do you need this?
Hi, this is required to be able to overwrite the condition that controls whether the Assembly Lines are created. We want the lines created whether there is zero qty or not, so we will amend the Condition to be Condition = not (AsmHeader."Item No." = ''); This will then allow the user to select what items they want on their assembly before they enter a qty.
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: 53765.