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
Comments
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.
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.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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...
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?
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
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.
Sr. Project Manager
S-Metric, LLC
jsung@smetric.com