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
748 stars 245 forks source link

The property 'DataClassification' cannot be used in this context #2062

Closed reiniroosh closed 6 years ago

reiniroosh commented 6 years ago

The table snippet adds a DataClassification property by default. This compiles, but when I try to publish to the database it errors:

[2018-04-19 14:49:59.68] The request for path /DynamicsNAV110/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: Extension compilation failed
HelloWorld.al(20,5): error AL0124: The property 'DataClassification' cannot be used in this context
HelloWorld.al(27,13): error AL0124: The property 'DataClassification' cannot be used in this context

Build 11.0.20348.0 vsix: 0.15.18771

Sample code:

table 50141 Test
{
    DataClassification = CustomerContent;

    fields
    {
        field(1;MyField; Integer)
        {

            DataClassification = CustomerContent;
        }
    }

    keys
    {
        key(PK0; MyField)
        {
            Clustered = true;
        }
    }
}
reiniroosh commented 6 years ago

Just wanted to point out that I'm using the newer vsix with the older platform, which I guessing is causing the issue. Haven't had time to try and figured I'd at least report it.

mynavblog commented 6 years ago

Hi @reiniroosh which CU you are using? I can be wrong but I think the DataClassification was added in CU3 for 2018 so if you have the previous platform (I can see you have CU2) then I think you should upgrade first.

Kris

StanislawStempin commented 6 years ago

You are using wrong vsix version. Please make sure to use the vsix that comes bundled on the product DVD: https://github.com/Microsoft/AL/wiki/Frequently-Asked-Questions#which-version-of-the-al-language-extension-should-i-use

We will soon implemented automated version checks to inform early about vsix -> server mismatch.