The OnafterGetRecord trigger, why is this trigger being executed more then once if you stay on the same record?
For example, when you have a form with a tabcontrol on it...
Each time you switch from tab, the OnAfterGetRecord gets executed :?:
Why is this?
Is there any other trigger i could use, wich get called only once?
Untill you go to the next / previous record?
0
Comments
I think that has worked for me in the past.
Otherwise you could just create a variable and assign it the primary key value of the current record, and if it re-occurs then don't execute your code.
Check "OnAfterGetCurrRecord". The OnAfterGetRecord is called each time the record is displayed.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The code in this trigger is executed before it is displayed on form but after the record is retrieved from the table. So, no problem in a TabControl based Form (it shows only one rec). But on a table box form, Navision calls this trigger for each record :!:
So, when you will only run code on you Current Record in tablebox form, you should use the trigger OnAfterGetCurrRecord.
The code in this trigger is also executed after the current record is retrieved from the table. So, if you have a table box form, and you have code in this trigger, the system only calls this trigger when it updates the current record in the table box. And this is what you need ;-)
Regards