AL icon indicating copy to clipboard operation
AL copied to clipboard

AL0679 Fires on Removed tables

Open PeterConijn opened this issue 4 months ago • 0 comments

Please include the following with each issue:

1. Describe the bug Tables may not be deleted, but must be set to Removed. Removed tables give an error in the permission sets since, well, they're removed. However, setting a table to Removed and removing it from permission sets still fires AL0679.

2. To Reproduce

  1. Find or create a table that is in a permission set
  2. Set the table to Removed
  3. Remove the table from all permission sets
table 11021918 "Report Header Buffer W1 ELC"
{
    ObsoleteState = Removed;
    ObsoleteReason = 'Table will no longer be used in the application.';
    ObsoleteTag = '24.0';

    Caption = 'Report Header Buffer';
    DataClassification = CustomerContent;

    fields
    {
        field(1; "Entry No."; Integer)
        {
            Caption = 'Document Type';
        }
    }
}

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior I would expect the rule not to fire on removed objects.

4. Actual behavior Rule AL0679 fires when an object is set to Removed.

5. Versions:

  • AL Language: v15.0.1177813 (pre-release)
  • Visual Studio Code: Version: 1.95.0-insider (user setup) Commit: fe997185b5e6db94693ed6ef5456cfa4e8211edf Date: 2024-10-23T05:06:13.568Z Electron: 32.2.1 ElectronBuildId: 10427718 Chromium: 128.0.6613.186 Node.js: 20.18.0 V8: 12.8.374.38-electron.0 OS: Windows_NT x64 10.0.26100
  • Business Central: 26.0.25690.0
  • List of Visual Studio Code extensions that you have installed: -- AL Language -- AL CodeActions -- AL Variable Helper -- AZ AL Dev Tools/AL Code Outline -- Dev Containers -- Docker -- GitHub Copilot -- GitHub Copilot Chat -- GitLens - Git Supercharges -- Waldo's CRS AL Language Extension -- WSL
  • Operating System:
    • [x] Windows
    • [ ] Linux
    • [ ] MacOS

Final Checklist

Please remember to do the following:

  • [x] Search the issue repository to ensure you are reporting a new issue

  • [x] Reproduce the issue after disabling all extensions except the AL Language extension

  • [x] Simplify your code around the issue to better isolate the problem

PeterConijn avatar Oct 23 '24 08:10 PeterConijn