hi all,
is there a way to get the timestamp or the lastmodifieddate/time of a record without creating a new datetime field for that issue and changing the onmodify-trigger?
*This post is locked for comments
Hi Jonathan,
How about Change Log?
how can i activate/use that? i need it on record base.
Here is link
www.archerpoint.com/.../setting-change-logs-microsoft-dynamics-nav-2013
msdn.microsoft.com/.../hh169208(v=nav.71).aspx
hi,
thx for the hints.
i tried it, but i does not help in that case.
the problem is the following:
an error occurs, when executing modify on PO-Line.
the error message is: there was a try to change an old version of a record of type PO-Line. the record must be reloaded.
so no record change is logged to the change log.
my idea was to get the lastmodified datetime during execution (before commit was executed and any data is written to the database).
Is that error message because of activating change log?
Are there any customizations?
I don't think just because of activating change log as it is standard feature and used by me/more lot of times.
that's something completely different (TM) ;) You will get this when something / somebody has changed and committed your record after you've read it. If it is not a heavy-use scenario, and you're more or less alone in your development database, then something is odd with your code. :) You can easily trip into this with form/page triggers interacting with other things, like code in the table or codeunits. It is amazing how many commits there are in standard NAV alone.
Do you have the offending code lines and surrounding, maybe we can help?
with best regards
Jens
hi mohana,
thx for your friendly answer and yes, there is a plenty of customization. i discussed the point with my colleagues. it seems, there are 2 modify statements applied on the same record at 2 times and a change between the 2 modifys, what causes that strange error.
i started to debug, but it's hard to find out, what causes the error (the first modify, which changes the record before the second modify).
my first attempt to get a modified datetime at runtime did not work.
this error should occur ever if you enable/disable change log, right?
may be you can comment one o those modify statements and check whether the logic is working fine or not and you can concentrate on design later?
yes the error occurs always. does not matter, if change log is enabled/disabled.
the main problem is to find the first modify call. the error occurs with the second modify. setting a breakpoint into the onmodify-trigger did not help, so it seems, it's a modify(false) call.
ok. do you mean you don't know where the first modify code is written?
and you are searching for it?
I thought you are aware of both codes..
May be you can use Code coverage tools and check
www.mibuso.com/dlinfo.asp
http://blogs.msdn.com/b/german_nav_developer/archive/2012/08/26/pimp-your-nav-2013-code-coverage-in-30-minuten-nachr-252-sten.aspx
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Saurav.Dhyani 2 Super User 2025 Season 2
RK-25090803-0 1