{"title":"FilterPageHandler attribute","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/attributes/devenv-filterpagehandler-attribute/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-filterpagehandler-attribute, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-filterpagehandler-attribute","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Specifies that the method is a FilterPageHandler method, which handles a specific filter page.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":242,"chars":135},{"level":2,"title":"Syntax","slug":"syntax","at":377,"chars":1723},{"level":3,"title":"Arguments","slug":"arguments","at":998,"chars":1102},{"level":2,"title":"Remarks","slug":"remarks","at":2100,"chars":690},{"level":2,"title":"Related information","slug":"related-information","at":2790,"chars":169}],"text":"> Version: _Available or changed with runtime version 1.0._\nSpecifies that the method is a FilterPageHandler method, which handles a specific filter page. The FilterPageHandler tests the UI that is generated by a FilterPageBuilder Data Type.\n## Applies to\n Method\n> NOTE\n> The FilterPageHandler attribute can only be set inside codeunits with the SubType property set to Test.\n## Syntax\n> Version: _Available or changed with runtime version 1.0._\n```al\n[FilterPageHandler]\nprocedure FilterPageHandler(var Record1: RecordRef [; var Record2: RecordRef] [; var Record3: RecordRef] [; var Record4: RecordRef] [; var Record5: RecordRef] [; var Record6: RecordRef] [; var Record7: RecordRef] [; var Record8: RecordRef] [; var Record9: RecordRef] [; var Record10: RecordRef]) : Boolean;\n```\n> IMPORTANT\n> The above signature requires the FilterPageHandler method to be global. See https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-al-methods.md%23local-and-global-scope.\n### Arguments\nRecord1\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record10*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record2*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record3*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record4*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record5*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record6*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record7*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record8*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n*[Optional] Record9*\nType: ../methods-auto/recordref/recordref-data-type\nHolds the record of the filter page.\n## Remarks\nThe FilterPageHandler method is called when a filter page is invoked in the code. It tests the UI that is generated by a FilterPageBuilder data type.\nYou use handler methods to automate tests by handling instances when user interaction is required by the code that is being tested by the test method. In these instances, the handler method is run instead of the requested user interface. The handler method should simulate the user interaction for the test case, such as validating messages, making selections, or entering values. You declare a handler type attribute on the method. Learn more about handler methods in Create Handler Methods<../devenv-creating-handler-methods>.\n## Related information\nAL Method Reference<../methods-auto/library>\ndevenv-method-attributes\nTest Codeunits and Test Functions<../devenv-test-codeunits-and-test-methods>"}