How can I prevent it from closing the form?

Franklin
Member Posts: 253
Hi everybody.
I want that before closing a form, you check a number of fields and, if they are empty, the form is not closing. I can´t find the correct function because in all cases it closes.
I write the code in ONCLOSEFORM() is it right?
I want that before closing a form, you check a number of fields and, if they are empty, the form is not closing. I can´t find the correct function because in all cases it closes.
I write the code in ONCLOSEFORM() is it right?
0
Comments
-
Use the OnQueryCloseForm trigger."Money is likewise the greatest chance and the greatest scourge of mankind."0
-
Form - OnQueryCloseForm() : Boolean
...
...
...
MyConditionVar := FALSE;
EXIT(MyConditionVar);0 -
kapamarou wrote:MyConditionVar := FALSE;
EXIT(MyConditionVar);"Money is likewise the greatest chance and the greatest scourge of mankind."0 -
Franklin wrote:Hi everybody.
I want that before closing a form, you check a number of fields and, if they are empty, the form is not closing. I can´t find the correct function because in all cases it closes.
I write the code in ONCLOSEFORM() is it right?
JUST
...
DON'T
....
DO
...
IT!!!!!!!!
Find another way.
](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)David Singleton0 -
it looks lke another job for "mandatory field" search0
-
einsTeIn.NET wrote:Looks like some kind of NAV male ware...
Of course there would be also aMyConditionVar := TRUE;
in the code...0 -
jaja thx for the answers... i´ll prove it on the other trigger...
EDIT: In that trigger is all right!!! :thumbsup:0 -
Franklin wrote:jaja thx for the answers... i´ll prove it on the other trigger...
EDIT: In that trigger is all right!!! :thumbsup:
really? if you move to the next record - your fields are still blank and if you fill in that record correctly you can close the form.
true? if so then it's not 100% effective. You want to cover all your bases and make the system work the same from everywhere therefore table validation is what you should be looking for.
ps try to stay away from code on forms if at all possible.
Is this for New items/customers/vendors/po's/so's, etc?????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