microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
783 stars 620 forks source link

[Possible Bug] Page filters are not consistent #8437

Closed aaugustijn closed 4 years ago

aaugustijn commented 4 years ago

In our application we have a need for forcing filters on a page for privacy and functionality reasons. We are in the process of converting from Navision to AL and we have found some weird behaviour in the way filters are enforced.

In this repository, you can find a demonstration of the functionality we find quite confusing: https://github.com/aaugustijn/ALPageFilterBug

In this repository you will find two pages which are both based on the Resource table. Both pages set a filter on a record with a 'No.' of 'TEST'. The difference between the two is the way the filters are set. In the ResourcesConst page, the filter is set in the OnOpenPage trigger, like so: SetFilter("No.", 'TEST');. In the ResourcesVariable, the filter is set according to a global which can be set by a public function in the page. (See this page).

We expected the two pages to have the exact same functionality when the same filter is applied, but we found a difference. In the ResourcesConst page, when the All button is pressed (see picture), nothing happens. The filter set by the page is still set. This is not the case in the ResourcesVariable page. When the button is pressed here, the filter is removed and all resources are now shown.

Remove all filters

Our question is this: how do we force a filter on a page? By some testing of myself I have not yet found a way to do it, like in the ResourcesConst example.

I hope someone can give me some answers :)

StanPesotskiy commented 4 years ago

Thank you for reaching out. Your request could be reporting a product bug not related to the AL extensibility. Please reach out to the relevant support channels as specified in Product Support On premises - https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=93d37907-ad94-d591-22e9-593cfa09dd3f On line – read more here https://docs.microsoft.com/en-ca/dynamics365/business-central/dev-itpro/administration/manage-technical-support or contact your partner If you are a partner open a support incident through Partner Center - https://partner.microsoft.com/en-us/pcv/dashboard/overview