how do I check for a fieldvalue before the user has left the record in a page ?

ravnhill
Member Posts: 1
NAV is new to me 
I have a field that I want to check before the user leave the record. the field must not be empty.
I have tried with Error('something') but without look.

I have a field that I want to check before the user leave the record. the field must not be empty.
I have tried with Error('something') but without look.
0
Answers
-
Try to Set NotBlank property as 'Yes' for the corresponding field.
Constraints -
If the NotBlank property is used on other fields than primary fields, the behavior is as follows:- If the field is blank, and never entered, the page can be closed.
- If the field has been entered, and the user tries to enter a blank value, a validation error occurs
0 -
You can do what Sowkarthika suggested or else if you have certain conditions then you can write code on the QueryClose Trigger of the Page.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Note that if you use the OnQueryClose method suggested by RockWithNav then this won't work if the user moves off the record by going to the first/next/previous/last record instead of closing the page. You would also need to add code to the OnFind and OnNext methods too and check when the user navigates to a different record. You'd also need to handle the normal record navigation in those methods.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions