Sometimes it is the only way to use this triggers to add needed cusom logic to a page object.
Comments
We had same requirement where a customer requested us to apply field validation OnQuerClose but sadly this isn't possible right now.
Category: Development
Just to clarify the Use Case (that helps, fyi!):One common requirement for OnNextRecord in a PageExtenstion in PTEs is to *really* implement mandatory field validations on key setup tables, such as Customers or Items. ShowMandatory only visually enforces the information, after all.OnQueryClose allows a PTE to perform validations on the record before the user leaves the record. However, we have also experienced users who will enter a partially valid record, then simply hit the Backward Navigation button, then close the page, never receiving any information about missing data. Another requirement for OnNextRecord and OnFindRecord is to control complex, configuration based record navigations, such as on top of security permissions, allowing users only to move between records they have reason to access, based on more complex logic than just a simple field validation (if this dimension is set, AND the total of the document is over this OR it uses this G/L Account).
Category: Development
It was suggested on GitHub 3 years ago and is really missed.
https://github.com/microsoft/AL/issues/3825
Category: Development
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team