D365 Business Central - Detailed Error Message with Call Stack
Microsoft added lot of new features in latest version of business central that is Business Central Wave 2 2021 (BC 19).
The most important feature from the Developer and End user point of view is to get the detailed error message. In BC 19 if any error pops up in the application then user can see the detailed information. Microsoft has enhanced the error message window with lot of additional details.
Once users get the detailed information then that information can be shared with the Developer or Partner for the quick analysis.
We will discuss how we can get the detailed error message. For demo, I will create one erroneous transaction and try to post it-
Now I got the error related to dimensions.
Now we can see that error message contains several different columns that represent the different kind of error details-
Description: Description column show the details about the error.
Source and Source Field Name: These columns represent the setup page or area where the error occurred and provide the link to a page where you can fix the issue.
Additional information: This column shows the additional information about the error message.
Support URL: This column provides a link to a troubleshooting guide or Microsoft Link according to the error message.
Error Call Stack: This is most important from the developer point of view to see where this error has been occurred.
Once user click on the Error call Stack. It will show the details about how the code is executed in sequence and which lines of code has given the error-
Also, when user open any page and the error occurred then also user can find the detailed information.
For example I have Disabled the Setup for Posting and when I try to open that setup it will give the error like below-
Then click on Detailed information then the detailed information will be shown and click on copy to clipboard to copy the call stack.
Note: This feature is not available for error message showing by using TESTFIELD function.
Thanks & Regards,
Naveen Gour
*This post is locked for comments