web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Prevent Card Page Navigation if field is blank

(1) ShareShare
ReportReport
Posted on by 573
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?
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,351

#2
Sumit Singh Profile Picture

Sumit Singh 2,072

#3
YUN ZHU Profile Picture

YUN ZHU 1,807 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans