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

Unable to hide page in the search list #4534

Closed Nyryus closed 5 years ago

Nyryus commented 5 years ago

Hi,

Related to the issue #4288 I was trying to hide a page of type Worksheet from the search, but I continue to get an error or a CodeCop warning.

page 50000 "EOS Test"
{
    PageType = Worksheet;
    ApplicationArea = All;
    UsageCategory = None;

    SourceTable = 36;
}

With this code I get this error: "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'" That is quite clear, but I need to not show this page in the search.

While if I use this code:

page 50000 "EOS Test"
{
    PageType = Worksheet;
    UsageCategory = None;

    SourceTable = 36;
}

I get the following warning, that I can hide with ruleset. "The page 'EOS Test' should use the UsageCategory and ApplicationArea properties to be searchable."

Would be nice to be able to hide a page, setting the usage category to None and without setting the application area.

Best regards

rivolemmik commented 5 years ago

Just remove the UsageCategory property line

AndreyKorepanov commented 5 years ago

@Nyryus, thank you for reporting the issue. I think your solution is quite OK. The warning in your case just informs that the page is not searchable, and as you said, you can easily hide it with rulesets. For further information regarding UsageCategory Property, please refer: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-usagecategory-property

f4n0 commented 5 years ago

Hi, I've also incurred in this error, but I think that create a ruleset for disabling this it is not a solution. And now I explain why: If I have in my solution like 50 pages I would like to have visibility in which page is set neither "application area" neither "usage category". If the "usage category" is set to "none" it will be more helpful to not throw any type of error/warning. Thanks Stefano Primo