Form - OnNextRecord
tompynation
Member Posts: 398
Hi,
when i write following line inside the OnNextRecord trigger of the form, then going to the next record does not work anymore:
gv_WijzAantalKGBool := FALSE;
When i comment this line in the OnNextRecord trigger, it still not working
But when i delete the line, then it works back to normal?
Is this normal?
That gv_WijzAantalKGBool is just a global variable
when i write following line inside the OnNextRecord trigger of the form, then going to the next record does not work anymore:
gv_WijzAantalKGBool := FALSE;
When i comment this line in the OnNextRecord trigger, it still not working
But when i delete the line, then it works back to normal?
Is this normal?
That gv_WijzAantalKGBool is just a global variable
0
Answers
-
this happens in every form...
Also in the Demo NAV database.
When you just write // in the OnNextRecord going to the next record stops working.
Is this a bug? I have NAV 5.0 SP1 on a windows vista0 -
i had to exit the step count myself0
-
Hey Tompy,
OnNextRecord Trigger determines how the system steps through the records in the table. If you write code in that record, Navision assumes that you want the change the way the systme steps through the records. So if you don't write code in the trigger to step between the record, you won't be able to step through your records anymore.
If you want only to evaluate a boolean variable after each record, put it in the OnAftergetCurrRecord.
Hope it helps...0 -
tompynation wrote:Hi,
when i write following line inside the OnNextRecord trigger of the form, then going to the next record does not work anymore:
gv_WijzAantalKGBool := FALSE;
When i comment this line in the OnNextRecord trigger, it still not working
But when i delete the line, then it works back to normal?
Is this normal?
That gv_WijzAantalKGBool is just a global variable
I think this was the fist bug I ever reported in Navision Financials.
The reply from PC&C was that its doing exactly what is says in the user manual. The manual says that "any code written in the trigger will replace the default action." and // is defined as code. (It is a reserved word after all).
So no its not a bug, just a strange quirk.
BTW if you think about it, it is quite logical, after all how else can the compiler know that you want to replace the default process.David Singleton0 -
if you want to put some code in form OnNextRecord(Steps) try this
example:
NEXT(Steps);
CurrForm."Due Date".EDITABLE(FALSE);
CurrForm.UPDATE(FALSE);0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
