We have a client that heavily uses the RTC environment. They are setup with full manufacturing (with MRP calculations) and warehousing with serial numbers. They also use E-Ship with UPS/Fedex integration. They're on NAV2009 R2.
For this particular environment, we're encountering problems where table triggers are SOMETIMES not being ran. For example:
- If the user enters the Quantity through RTC, the Quantity Outstanding doesn't get populated.
- If the user inserts a new Item, the code on the OnInsert isn't ran
- When a new sales order is entered, the No. Series isn't updated with the next number
These are just some of the problems, there are more instances such as this that all points to the OnValidate, OnDelete, OnModify, and OnInsert aren't being ran sometimes on the tables.
Needless to say, I cannot replicate this on their environment as well. But the problem all seems that the triggers are not being ran.
Anyone else running into problems like this? Or am I crazy?
0
Comments
Chn
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
The problem with the population of the Quantity Outstanding - probably is some error in the logic or due to too many conditions for the validation. Happens just to forget what exactly is going on in there.
the OnInsert trigger? Sounds really strange but sometimes in a moment of frustration, you might forget when exactly is executed each trigger - not when you expected, but when NAV is programmed to execute it
so, probably the last one is true, you are going crazy
P.S.: I don't say you are wrong, but always check and double check everything. Good luck.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Again, we have many clients on RTC, but only this particular site is giving us the problem. This site is also transacting the most amount of data.
I was just wondering if anyone with heavy transactions using RTC is experiencing the same thing as me.
I'm now leaning towards hardware setup and SQL settings.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I would start with direct access to the database via t-sql, odbc c/front etc.
I once had a client that worked out how to get data into excel directly with ODBC, but didn't realize that changes in his spread sheet were being written back to the database.
Then of course code, its quite possible for some very simple innocuous piece of code some where to cause this problem.
Reports also are dangerous, because the user has F9 access to code. If ever you need to write code in a form but don't have a developers license, then you can copy paste the entire form into the request form in a report and it will work exactly like a report AND you can write code. It's extremely unlikely but its possible the client is doing this.
Ultimately though if this is a bug, the only way to find it is going to be to eliminate all the possibilities then fall back on the impossibility that there is a bug in Navision.
Have you tried using the change log on selected fields and tables that are skipping the validate logic?
http://mibuso.com/blogs/davidmachanick/
RIS Plus, LLC
If it's a bug, then I would suspect more people would encounter the same issues as I have. Apparently, none has so it's specific to this installation I guess.
I do have a feeling that it's a bug strictly in the RTC environment on a very certain user action in RTC, the problem is that I cannot replicate it. When I asked the user on how they enter the data for the records in question, the usual answers is they don't remember...
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
What I have found is possible is users (especially new users) find ingenuous ways to break the system that the developers never thought of.
Have you looked at alternate ways of getting to the tasks the users are performing?
Is everything being done through a NAV client or are you running any web services? Any custom routines that are updating the tables without validations?
http://mibuso.com/blogs/davidmachanick/
One thing about the problem with No. Series not incrementing, I did a test a while back putting in COMMIT, then the problem seemed to go away. However, COMMIT caused other problem so I had to remove it.
From what I understand of COMMIT, it writes whatever is in cache to the disk. So is it possible that the cache is so full that a lot of additional tasks are ignored?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
If the problem is executable based, then you have found a major bug.
NAV has fixed problems in the past where NAV and SQL did not work together properly - like the exists option in flowfields in version 5.
http://mibuso.com/blogs/davidmachanick/
They will only look at it if I can duplicate the problem. But I can't... All the errors are reported after the problem has already occured...
I've turned on the garbage collection command and it's suppose to enhance the RTC performance. Lets see if this resolves the problem. If it does, I'll blog and post about it.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I don't think that is correct. COMMIT simply draws a line in the sand and says that all transactions up to this point and now committed. But those committed transactions could be in CACHE or In the Log File or written to the database.
If COMMIT worked as you say, then every time there was a commit, Navision would have to come to a complete halt, stop all processing and then wait until the cache was written to log and the log was written to the database. There are scenarios where that can take hours.
Are you doing anything with serial numbers that would cause a quantity to be processed individually for each serial number or something of this nature?
NAV 2013 - we get a debugger for RTC which will make this type of troubleshooting more practical.
Have you tried running a trace in SQL Server profiler?
http://mibuso.com/blogs/davidmachanick/
I don't even know where to start tracing from. The problem appears randomly and across different users in the company.
I suspect I will get milliions of lines before the problem can even occur. And even if the problem occured, it may take a day or 2 before someone catches it. i.e. you can post without outstanding quantity if there are other lines with outstanding quantity.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
http://mibuso.com/blogs/davidmachanick/
Nope. No EXIT, QUIT, SKIP or anything else that would cause table triggers to skip.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
In your triggers add to the firstline of the trigger:
clear(logtrigger)
logtrigger.name = 'triggername'
logtrigger.insert(true);
and check after a few days if you are missing an entry. To keep the table small and fast you could add some code in the logtrigger.insert trigger do check the numbering and delete the records every 2000 records.
:shock:
That would mean I have to modify every table and codeunit?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Now I need to add the roling eyes :roll: and say "of course you don't need to add it to all the triggers, just the suspected ones. If you can't show Microsoft support when/where it's going wrong you will have a hard time resolving this". And again :roll:
I added the garbage collection to the RTC server and I haven't heard of any problems so far. But I'll keep monitoring and report back.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
That's the problem. I don't know where its' most suspect. It just randomly occurs in every parts of NAV.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Recently I have been sorting this kind of issues by the "low level" checks on the relevant table. Therefore what I would do e.g. for incorrect Outstanding Qty. on Sales Line is that I would introduce a check in either SQL On Update trigger (that one may provide best results as it would capture even external access to DB from outside NAV), or in Codeunit 1 - OnDatabaseModify. That check would simply calculate itself the expected Sales Line Outstanding Qty. based on the system data and throw an error if it is wrong.
I have myself successfully used this type of check in other scenarios and it has lead me to the root cause of the problem quite quickly. It at least shows you where the issue is as the system should throw to the user the error in case of "inconsistency".
Regards,
Igor
BR Jens
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Somtimes it can help us not feel we are going crazy when someone else sees the Ghost too.
So just to inform you we are moving to 2009 Sp1 at the moment and I have seen exactly this behavior though not as extensive as yours.
Basically it is only happening on Sales Orders (so far) and as with you the Behavior appears to be entirely random. When entering a value in the Quantity field, sometimes the updates to fields like Outstanding Quantity and "Qty. To Ship" simply do not happen.
And like you we are entirely certain of NO external sources of data or input in this: Such as dataports, ODBC, SQL or anything.
You might want to look at the most recent hotfixes for the product. I recently had very similar issues with Sales Orders resolved by apply a hotfix.