Howdy-ho fellow NAV'ers,
I would like to know if there is a log file available for/in Dynamics Nav in which I can find errors or warnings? My searchings across the internet haven't been very succesfull.
If there is no log file I'm going to try and build my own log. ](*,)
0
Comments
Also, if you open some transaction in your "wrapper" codeunit (you write some table), and you want to recursively use the structure i've said, like you have to run a commit at every loop (this is enforced by NAV).
Once you practice with this structure, you'll want to use it for every "interface-with-third-party-products" process you create . It's very powerful if used wisely.
If you have some doubts, just ask (or better search mibuso)...but I encourage you to bang your head on it for a day or so
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Why?
@David Singleton - I want to use this to keep track of any errors that pop-up to make testing and bug-fixing less dependable on customer input. And in time I want to expand the log with delete and modify messages, just to "monitor" user actions so we can tell them they have been morons.
Ah so basically a reallocation of the Training Budget to the Development budget.
I never really understood why people are so opposed to training in Navision. I guess the old rule applies,
1- my own practice and experience
2- quality control of our code and modules
So in ideal circumstances it would give us a log without errors and but with delete and modify actions of users.
i can create txt file if error
but how to catch the error message to put it in the log file?
thanks
and back to the original topic: I explained how to log an error refers to the fact i was supposing you wanted to monitor and log one single process, not the entire application.
I probably misunderstood your post. "If codeunit.run" traps the error without showing it, but you, instead, want to write every error that pops up to the user, isn't it? in the latter case, David's suggestion is the way to go (or an homemade log, if you have big time to spend and test!)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
..Just some monday morning brainstorming
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
when the error come, it cant execute the code
IF NOT SH.INSERT(TRUE) THEN
StrLine2 := GETLASTERRORTEXT;
when i want to insert, it has redundant data
then it cant execute the next code
On the other hand, If you use an "IF sh.INSERT(FALSE) THEN" instruction, you will never ever got an error in the GETLASTERRORTEXT, because there's no error at all. because
To try this functionality, write a new codeunit and do this in the onrun trigger: create a new report and do an
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I'll send MS a request for this, signed, stamped and sealed... in triplicate.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
hi Belias,
the problem is i create this code in codeunit
and i put the condition code in C# webservice, not from NAV it self
so I a little bit confuse where should i put this