- Microsoft Dynamics 365 Business Central Cookbook
- Michael Glue
- 119字
- 2021-06-24 13:24:14
How it works...
In order to add our own filter token, we subscribed to the OnAfterMakeTextFilter event that's in the Text Management codeunit of the base application. This event is fired at any time that the user types a filter value into a list. By defining our own filter token string, we can then implement custom logic in order to determine which set of records applies to the filter.
Be careful with the filtering logic that you implement. Although you can filter based on whatever logic you like, introducing bad performing logic will not lead to a very nice customer experience if the user has to wait too long for the list to get filtered.