Here are the details: I have an extension that is published on Microsoft Store. I want to make it work for BC26(Business central 2025 Release Wave1).
- Extension:
2. I have following code:
tableextension 71188627 “Service Invoice Header NBR” extends “Service Invoice Header”
{
Caption = ‘Service Invoice Header’, Comment = ‘ro-RO=Antet Factura Service’;
fields
{
field(71188575; “Invoicer Code NBR”; Code[20])
{
Caption = ‘Invoicer Code’, Comment = ‘ro-RO=Cod Facturist’;
TableRelation = Employee;
DataClassification = CustomerContent;
}
field(71188576; “Registration No. NBR”; Text[20])
{
Caption = ‘Registration No.’, Comment = ‘ro-RO=Nr. Inregistrare’;
DataClassification = CustomerContent;
}
field(71188577; “Commerce Trade No. NBR”; Text[20])
{
Caption = ‘Commerce Trade No.’, Comment = ‘ro-RO=Nr. Inregistrare Registrul Comertului’;
DataClassification = CustomerContent;
}
field(71188578; “VAT Date NBR”; Date)
{
Caption = ‘VAT Date NBR’, Comment = ‘ro-RO=Data TVA NBR’;
DataClassification = CustomerContent;
ObsoleteReason = ‘Replaced with VAT Reporting Date’;
#if not CLEAN220
ObsoleteState = Pending;
#else
ObsoleteState = Removed;
#endif
}
}
keys
{
key(Key1NBR; “Posting Date”)
{
}
}
#if not CLOUD260
[IntegrationEvent(false, false)]
#pragma warning disable AL0818
local procedure OnBeforePrintRecords(var ServiceInvoiceHeader: Record “Service Invoice Header”; ShowRequestPage: Boolean; var IsHandled: Boolean)
#pragma warning restore AL0818
begin
end;
#endif
}
3.1 When I try to run tehnical validation, I get this error:
src\src\TableExtensions\ServiceInvoiceHeader.TableExt.al(4,25): error AS0018: Procedure ‘OnBeforePrintRecords(var Record “Service Invoice Header”, Boolean, var Boolean)’ has been removed in ‘TableExtension Service Invoice Header NBR’. A procedure that belong
s to the public API must not be removed as it will break dependent extensions calling this procedure.
App generation failed with exit code 1
3.2 If I remove from the above code: #if not CLOUD260 and #endif , I get this compiling error:
d:\Mihai\Repos\bc_localizare\src\TableExtensions\ServiceInvoiceHeader.TableExt.al(48,21): error AL0819: The Table ‘Service Invoice Header’ already defines an event called ‘OnBeforePrintRecords’ with the same parameter types in ‘Base Application by Microsoft (26.0.30643.32552)’.
I tried in the past using pragma #pragma warning restore AL0818, but now this warning is being transformed into an error as they say here:
Compiler Warning (future error) AL0818 – Business Central
The {0} ‘{1}’ already defines an event called ‘{2}’ with the same parameter types in ‘{3}’.
My Question: How can I make my extension work on BC26, and publish it to MS Store, without a breaking change?