Standard NAV Previous & Next buttons

poppins
Member Posts: 647
Hi everyone,
We have the buttons Next & Previous in NAV pages.
I have a customization to make in a page: If I click on Next, a certain code has to be executed, and if I click Previous, a different code should be executed.
As far as I know, the trigger in the code is the same for both buttons: OnNextRecord.
If I am going to place my code there, how can I make the difference between the two?
Thanks in advance
We have the buttons Next & Previous in NAV pages.
I have a customization to make in a page: If I click on Next, a certain code has to be executed, and if I click Previous, a different code should be executed.
As far as I know, the trigger in the code is the same for both buttons: OnNextRecord.
If I am going to place my code there, how can I make the difference between the two?
Thanks in advance

0
Comments
-
Hi poppins,
Page have this trigger : "OnNextRecord(Steps : Integer) : Integer"
In this trigger, Steps is a integer argument, it is give the -1 when you press previous button and +1 when you press Next button.
Thanks,
Purvesh Maisuria.1 -
Please, do not do that. Go next/previous are not NAV triggers. In general, movement between records are not events you can catch/react on them. It is not a NAV way of working.
And using OnNextRecord will totally mess the app if you do not know what you are doing. because overloading these triggers means that the standard behaviour will not work...
Rather describe the business case you need to solve and try to find the standard way of solving the reason for this requirement.0 -
I don't see any problem using this trigger. You just need to know that you cut off the standard functionality, which you neet to emulate. Your code needs to do the equivalence of
EXIT(NEXT(Steps));
Take into consideration, though, that this trigger is not tied to those buttons, but generally to retrieving records for display. It is used on open, refresh, scrolling, ...
So most likely, this is not the proper approach. For this reason I join in with kineRather describe the business case you need to solve and try to find the standard way of solving the reason for this requirement.0 -
Please, do not do that. Go next/previous are not NAV triggers. In general, movement between records are not events you can catch/react on them. It is not a NAV way of working.
And using OnNextRecord will totally mess the app if you do not know what you are doing. because overloading these triggers means that the standard behaviour will not work...
Rather describe the business case you need to solve and try to find the standard way of solving the reason for this requirement.So most likely, this is not the proper approach. For this reason I join in with kine
Hi,
Thanks for your answer...
I created a custom page with type Card.The page is reading records from a buffer table.
What I need to do is that when I click Previous, I only display the previous record, but when I click Next, I need to insert the content of the buffer table for that record into another table.And when I am in the last record and I click Next, I need to open another page(to do some checks and controls).
That is my requirement...
0 -
What business problem will be solved by this requirement? This way of working is very unlike the way NAV handles things and therefore, in my opinion, not the preferred way of solving the business problem.
Developing this requirement will most probably confuse the users of the system, because this page will be working in a different way than all other pages.
I think the best way of customizing NAV is following the way the standard application works.
Is it not possible to add the records in the other table by using an action?0 -
He is apparently trying to code some sort of wizard. Just a wild guessSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
If we know whole requirements, that might be better approach.
However, if you have to accomplished that, I suggest make custom NEXT and PREVIOUS button and play with that logic.
Later, much easier to add another lay of function if you have to.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