Al: Analysis rule AW0006 should not give warning in case UsageCategory is set to None

Created on 4 Mar 2019  路  3Comments  路  Source: microsoft/AL

I believe this warning not give a warning in case the UsageCategory property is set to None.

UICop bug static-code-analysis

Most helpful comment

In case we set UsageCategory to 'None', we explicitly tell the page should not be listed in the search results. This makes the AW00006 rule (to set the ApplicationArea) no longer applicable for this scenario.

Page 2060202 "NVT Alert User Group Members"
{
    Caption = 'User Group Members';
    DelayedInsert = true;
    PageType = List;
    PopulateAllFields = true;
    SourceTable = "Alert User Groups Members";
    UsageCategory = None; // <------

In an attempt to fix the warning - by asssigning the 'ApplicationArea' - a error is shown:
The property 'ApplicationArea' can only be set if the property 'UsageCategory' is set with any of the values of :'Lists,Tasks,ReportsAndAnalysis,Documents,History,Administration'

So in our opinion rule AW0006 should not apply in case we've set UsageCategory to None.

All 3 comments

In case we set UsageCategory to 'None', we explicitly tell the page should not be listed in the search results. This makes the AW00006 rule (to set the ApplicationArea) no longer applicable for this scenario.

Page 2060202 "NVT Alert User Group Members"
{
    Caption = 'User Group Members';
    DelayedInsert = true;
    PageType = List;
    PopulateAllFields = true;
    SourceTable = "Alert User Groups Members";
    UsageCategory = None; // <------

In an attempt to fix the warning - by asssigning the 'ApplicationArea' - a error is shown:
The property 'ApplicationArea' can only be set if the property 'UsageCategory' is set with any of the values of :'Lists,Tasks,ReportsAndAnalysis,Documents,History,Administration'

So in our opinion rule AW0006 should not apply in case we've set UsageCategory to None.

Any word on if/when this will be corrected?

Hi! It is on our backlog, but I cannot provide an ETA. Once the issue is picked up, it will be marked as in-progress and a milestone will be attributed.

Was this page helpful?
0 / 5 - 0 ratings