microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
719 stars 242 forks source link

Symbol Error AL0443 - "Allow Data Analysis Mode." #7715

Open MotivatedEmployee opened 2 months ago

MotivatedEmployee commented 2 months ago

1. Describe the bug

When working with AL Language Version 13.x in a project for BC Version 23.5x, the following message appears when using the "Allow Data Analysis Mode." permission (symbol): "The system object provided is not one of the valid system objects.AL (AL0443)".

If you change "Allow Data Analysis Mode." to "Allow Data Analysis Mode" (without the dot), the error does not occur, However, the project can no longer be published in the BC 23.5 system because the "Allow Data Analysis Mode" permission is not recognized.

"...failed with code UnprocessableEntity. Reason: Extension compilation failed PermissionExample.al(6,26): error AL0443: The system object provided is not one of the valid system objects."

2. To Reproduce Steps to reproduce the behavior:

  1. Create an permission using system "Allow Data Analysis Mode." for BC 23.5 (with 23.5 symbols) and AL Language 13.x.
  2. You should get the Error "The system object provided is not one of the valid system objects.AL (AL0443)".
  3. Change the system "Allow Data Analysis Mode." to system "Allow Data Analysis Mode" (without the dot)
  4. Try to publish the Extension.
  5. You should get the Error "...failed with code UnprocessableEntity. Reason: Extension compilation failed PermissionExample.al(6,26): error AL0443: The system object provided is not one of the valid system objects."
permissionset 50100 "Permission Example"
{
    Access = Public;
    Assignable = true;
    Caption = 'Permission Example';
    Permissions = system "Allow Data Analysis Mode." = X;
}

3. Expected behavior Be able to publish while using "Allow Data Analysis Mode." symbols.

4. Actual behavior Can not publish in BC Version 23.5x with "Allow Data Analysis Mode." or "Allow Data Analysis Mode" symbols

5. Versions:

thloke commented 2 months ago

This is a problem. What happened was that between BC 23 and BC 24, the name of the system permission was changed to remove the period at the end. However, because the system permissions are special and they're not in the downloaded symbols but are baked into the compiler, renaming this caused the compiler to expect the new name regardless of whichever BC platform you are targeting.

Because the version of the compiler in the server expects the old name, and the marketplace version expects the new name you end up in this situation.

As a workaround: If you need to compile/publish this, you'll need to use a version of the compiler that expects the old name (version 12 I think).

In the meanwhile, I'll accept this bug so that the latest marketplace version will support the right name based on the targeted BC version.