AL icon indicating copy to clipboard operation
AL copied to clipboard

Symbol Error AL0443 - "Allow Data Analysis Mode."

Open MotivatedEmployee opened this issue 1 year ago • 1 comments

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:

  • AL Language: v13.0.971907
  • Visual Studio Code: 1.88.0 (user setup)
  • Business Central: 23.5.16502

MotivatedEmployee avatar Apr 11 '24 14:04 MotivatedEmployee

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.

thloke avatar Apr 12 '24 02:04 thloke

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25.0.22172.0 and VS Code Extension Version 14.0.1086760.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

JesperSchulz avatar Aug 06 '24 09:08 JesperSchulz