-
Notifications
You must be signed in to change notification settings - Fork 263
Description
1. Describe the bug
In our AppSource application we had to renumber some table extensions to solve possible ID conflicts with other apps. In a first step I made a copy of the table extension object file, changed the ID and name of it and deleted all fields and procedures from the original table extension. In this first step, it was not possible to delete the original and empty table extension, but we were able to release the app without any breaking changes.
We released this app and after that, I was able to delete the old, empty table extensions without getting any error. But when the table extension contains at least one public procedure, I get an AS0018 error:
error AS0018: Procedure 'CCSMyProcedure()' has been removed in 'TableExtension CCS My Table'. A procedure that belongs to the public API must not be removed as it will break dependent extensions calling this procedure.
2. To Reproduce
Steps to reproduce the behavior:
- Create a tableextension with a new field and a public procedure, like this:
tableextension 5013400 "CCS DM MyOriginalTablExtension" extends "Sales Line"
{
fields
{
field(5013400; "CCS DM My Description"; Text[100])
{
Caption = 'My Description';
DataClassification = CustomerContent;
ToolTip = 'Specifies a custom description for the sales line.';
}
}
procedure CCSDMGetMyDescription(MyDescription: Text[100]): Text[100]
begin
exit(MyDescription);
end;
}
- Release the app with version 1.0.0.0 and use this app version in the AppSourceCop.json: "version": "1.0.0.0"
- Increase the version in the app.json to 2.0.0.0
- Make a copy of the table extension and change the ID and the name. Then delete the fields and procedure in the original object:
tableextension 5013400 "CCS DM MyOriginalTablExtension" extends "Sales Line"
{
}
tableextension 5013401 "CCS DM MyOriginalTablExt 2" extends "Sales Line"
{
fields
{
field(5013400; "CCS DM My Description"; Text[100])
{
Caption = 'My Description';
DataClassification = CustomerContent;
ToolTip = 'Specifies a custom description for the sales line.';
}
}
procedure CCSDMGetMyDescription(MyDescription: Text[100]): Text[100]
begin
exit(MyDescription);
end;
}
- Release the app with version 2.0.0.0 and use this app version in the AppSourceCop.json: "version": "2.0.0.0"
- Increase the version in the app.json to 3.0.0.0
- Delete the old and empty tableextension 5013400. Error AS0018 appears!
3. Expected behavior
I expected that the old and empty table extension can be deleted. The described process already works if the table extension only contains fields or local and internal procedures. But if it contains at least one public procedure, the process does not work.
4. Actual behavior
The AppSourceCop and compiler gives an error:
Procedure 'CCSDMGetMyDescription()' has been removed in 'TableExtension CCS DM MyOriginalTablExtension'. A procedure that belongs to the public API must not be removed as it will break dependent extensions calling this procedure.
5. Versions:
- AL Language: 15.2.1630495
- Visual Studio Code: 1.103.0
- Business Central: 25.3
- List of Visual Studio Code extensions that you have installed: "AL CodeActions", "AZ AL Dev Tools/AL Code Outline"
- Operating System:
- Windows
- Linux
- MacOS
Internal work item: AB#601438