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

AL problem (AA0210) GenJournalBatch #5393

Closed TimothyWatkins closed 4 years ago

TimothyWatkins commented 5 years ago

Following filter gives an AL compiling notification (AA0210) with runtime 4.0 V15.

GenJournalBatch.SetRange("Bal. Account Type", GenJournalBatch."Bal. Account Type"::"Bank Account");

(field) "Bal. Account Type": Option The table Gen. Journal Batch does not contain the key with the field Bal. Account Type.AL(AA0210)

I think I can assume this is a base code issue? If not would appreciate a way of resolving. :)

atoader commented 5 years ago

Hi Timothy,

You can find more information here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-using-code-analysis-tool https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/codecop

As far as the rule is concerned, the error reported is correct. You can ignore it by using a ruleset if you do not find it useful.

atoader commented 5 years ago

Is there more information we can provide?