I have been reading this article (
https://yzhums.com/45007/) on how to prevent a Card page from being closed if a field is blank. Using the OnQueryClosePage and Rec.TestField() code works great. However, this does not prevent a user from navigating to the next or previous record.
I've also look at code that can be placed in the OnOpenPage trigger using the Rec.SetFilter, which is fine if I want to always prevent record navigation, but how about conditionally based on a field being blank.
I have tried using the Rec.SetFilter logic in a fields OnAfterValidate trigger, but that does not seem to work.
Any thoughts on how to accomplish this?