简体   繁体   中英

Microsoft Dynamics NAV: Error Message Log

I'm still new to using Dynamics NAV and I'm still a junior Dev so I have a few questions:

I need to be able to Log error messages in NAV as they happen, I have the following fields in a table:

1 Entry No. Integer
2 Error Message Integer
3 Object ID Integer
4 Session ID Integer
5 User ID Integer
6 Object Name Text 250

It needs to log that information when an error occurs, I'm not really sure how to do it.

I'm not sure if you are trying to log errors in a specific object you are working on.

Typically, I use

   String := GETLASTERRORTEXT

in my custom code, when calling other Codeunits. This will give you the error description, which you can insert into your custom error log table.

Here is the documentation:

https://docs.microsoft.com/en-us/dynamics-nav/getlasterrortext-function

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM