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

[Bug] Code Analyzer check rule AL0253 cannot recognize key in virtual table #4404

Closed OSHK closed 5 years ago

OSHK commented 5 years ago

I've created a new page License Permission based on the virtual table License Permission with the following sorting order: The SourceTableView = SORTING ("Object Type", "Object Number") WHERE ("Object Type" = FILTER (<> TableData));

The Code Analyzer shows me an error that sorting fields should be part of the table keys:

image

As far as I see, "Object Type","Object Number" is a primary key in the License Permission table:

image

In my opinion, there should not be such warning in this case.

Additional Info: AL Langauge: 2.1.69331 Visual Studio Code: 1.30.1 Target Database: D365BC CU 02 26413 (on premises) The following rules were used:

    "al.codeAnalyzers": [
        "${CodeCop}",
        "${PerTenantExtensionCop}",
        "${AppSourceCop}"
OSHK commented 5 years ago

Am I correct that the status "ships-in-future-update" means that the issue already solved?

I have just checked on the following version and it seems to be that it still works in the same way:

qutreson commented 5 years ago

Hi @OSHK, I just tried using the latest extension from the marketplace and from our master branch and it seems that this issue has been fixed. Please feel free to open a new issue if it still reproduces on the latest versions.