ALAppExtensions
ALAppExtensions copied to clipboard
Create Event Request Table 27 OnBeforeCheckProdBOMLine
Add the following procedure customization, please:
local procedure CheckProdBOMLine(CurrFieldNo: Integer)
var
ProductionBOMVersion: Record "Production BOM Version";
IsHandled: Boolean;
begin
//new event
OnBeforeCheckProdBOMLine(IsHandled, Rec, CurrFieldNo);
if IsHandled then
exit;
//new event
ProdBOMLine.Reset();
ProdBOMLine.SetCurrentKey(Type, "No.");
ProdBOMLine.SetRange(Type, ProdBOMLine.Type::Item);
ProdBOMLine.SetRange("No.", "No.");
if ProdBOMLine.Find('-') then begin
if CurrFieldNo = FieldNo(Type) then
Error(CannotChangeFieldErr, FieldCaption(Type), TableCaption(), "No.", ProdBOMLine.TableCaption());
if CurrFieldNo = 0 then
repeat
if ProdBOMHeader.Get(ProdBOMLine."Production BOM No.") and
(ProdBOMHeader.Status = ProdBOMHeader.Status::Certified)
then
Error(Text004, TableCaption(), "No.");
if ProductionBOMVersion.Get(ProdBOMLine."Production BOM No.", ProdBOMLine."Version Code") and
(ProductionBOMVersion.Status = ProductionBOMVersion.Status::Certified)
then
Error(CannotDeleteItemIfProdBOMVersionExistsErr, TableCaption(), "No.");
until ProdBOMLine.Next() = 0;
end;
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckProdBOMLine(var IsHandled: Boolean; Item: Record Item; CurrentFieldNo: Integer)
begin
end;
@AlexanderYakunin Hello. Have you had a chance to review this request? Are there any updates on this?
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: 11042.