Mousewheel - Bug?!

voc
Member Posts: 11
In the OnAfterGetRecord of the "Employee Card" I prompt a message if some fields are not filled and i go back to xRec so that the user has to fill out these fields.
If I use PageUp or PageDown it works fine. But if I change the record by scrolling with the mousewheel I get the message more often the faster I scroll...
If i start the Debugger and scroll fast, he only fires the AfterGetRecord - Trigger once. Is this an unsolvable bug or is there may a solution?!
Regards Claus
If I use PageUp or PageDown it works fine. But if I change the record by scrolling with the mousewheel I get the message more often the faster I scroll...
If i start the Debugger and scroll fast, he only fires the AfterGetRecord - Trigger once. Is this an unsolvable bug or is there may a solution?!
Regards Claus
0
Comments
-
Have you tried to put your code in OnAfterGetCurrRecord??? Probably the wheel usage jumps more records than just one...
If there is no code in that trigger the debugger won't stop there...0 -
yeah i tried... but does not change anything0
-
I have done something similar for my development but I used ERROR instead of MESSAGE. Would that help??? The Error will cause it to stop... If the code is only on the OnAfterGetCurrRecord it works for me...0
-
no, that doesn't help, 'cause error closes the form and the form shouldn't be closed, 'cause the user first has to fill the required fields...0
-
I went back to see my code...
I actually don't use ERROR... (Nice memory...). I perform some checks and if they fail I do a
SETPOSITIO(xRec.GETPOSITION) to take the user back to the record he was viewing...0 -
hm, thanks for the answer, but doesn't make any changes0
-
can you explain more the code you're using for "Mandatory Fields"0
-
Do you need the message only when the user change some defined field values or ever when he browse trough the recs (mouse wheel, is the same like PG UP / Down).
If 1. then don't use the OnAfterGetRecord trigger for this, if second i find this ](*,) because ever a message pops up.
RegardsDo you make it right, it works too!0 -
if you need this only after a modification use these triggers on form:
Form - OnNextRecord(Steps : Integer) : Integer IF NOT CheckVatRegNo THEN EXIT(0); EXIT(NEXT(Steps)); Form - OnAfterGetRecord() ... RecIsModified := FALSE; Form - OnModifyRecord() : Boolean RecIsModified := TRUE; //"Gen. Bus. Posting Group" <> xRec."Gen. Bus. Posting Group"; EXIT(TRUE); Form - OnQueryCloseForm() : Boolean EXIT(CheckVatRegNo); CheckVatRegNo() : Boolean IF RecIsModified THEN BEGIN IF (Condition) THEN BEGIN IF NOT CONFIRM('Ignore that a the FIELD has not the correct value',FALSE) THEN EXIT(TRUE); CurrForm."SomeField".ACTIVATE; EXIT(FALSE); END; END; EXIT(TRUE);
So the confirm is only displayed when a rec (here the field in the condition) is modified and it will displayed when the user wil close the form or step to a next / new record.
RegardsDo you make it right, it works too!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