Closed aaugustijn closed 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
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 theOnOpenPage
trigger, like so:SetFilter("No.", 'TEST');
. In theResourcesVariable
, 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 theAll
button is pressed (see picture), nothing happens. The filter set by the page is still set. This is not the case in theResourcesVariable
page. When the button is pressed here, the filter is removed and all resources are now shown.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 :)