When creating a configuration package for table 23 - Vendor and with validation for "No." field, gives an error when the no. series for vendor is not set to manual. The issue is the validate logic of the "No." field in Vendor table. When importing, there is no "xRec". It should do a check if the Vendor with the "new" No. exits.
On the customer table this check is done.
//current code
trigger OnValidate()
begin
if "No." <> xRec."No." then begin
PurchSetup.Get();
NoSeriesMgt.TestManual(PurchSetup."Vendor Nos.");
"No. Series" := '';
end;
if "Invoice Disc. Code" = '' then
"Invoice Disc. Code" := "No.";
OnAfterValidateNo(Rec, xRec);
end;
//new code
trigger OnValidate()
var
Vendor: Record Vendor;
begin
if "No." <> xRec."No." then begin
if not Vendor.Get(Rec."No.") then begin
PurchSetup.Get();
NoSeriesMgt.TestManual(PurchSetup."Vendor Nos.");
"No. Series" := '';
end;
end;
if "Invoice Disc. Code" = '' then
"Invoice Disc. Code" := "No.";
OnAfterValidateNo(Rec, xRec);
end;
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team