{"title":"Understanding the error dialog","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-error-dialog/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-error-dialog, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-error-dialog","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Understand the different parts the error dialog to be able to help mitigate issues for users","date":"2024-01-03","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Understanding the error dialog","slug":"understanding-the-error-dialog","at":0,"chars":7336},{"level":2,"title":"Visual elements of the error dialog (2022 release wave 2 and earlier)","slug":"visual-elements-of-the-error-dialog-2022-release-wave-2-and-earlier","at":468,"chars":519},{"level":2,"title":"Visual elements of the error dialog (2023 release wave 1 and later)","slug":"visual-elements-of-the-error-dialog-2023-release-wave-1-and-later","at":987,"chars":474},{"level":2,"title":"Information in Copy details section","slug":"information-in-copy-details-section","at":1461,"chars":4433},{"level":3,"title":"Sample KQL code (troubleshoot further with telemetry)","slug":"sample-kql-code-troubleshoot-further-with-telemetry","at":3809,"chars":411},{"level":3,"title":"Understanding the AL stack trace","slug":"understanding-the-al-stack-trace","at":4220,"chars":1674},{"level":4,"title":"Example","slug":"example","at":4615,"chars":1279},{"level":2,"title":"Error message telemetry","slug":"error-message-telemetry","at":5894,"chars":1049},{"level":2,"title":"Related information","slug":"related-information","at":6943,"chars":393}],"text":"# Understanding the error dialog\nThe AL language has many error handling features, which can help you deal with unexpected situations that occur when code is run. Whenever an error is surfaced to the user, the Business Central client displays an error dialog, similar to the figure later in this article. In this article, you can learn more about the different parts of the error dialog so you can more effectively help users mitigate any issues they might encounter.\n## Visual elements of the error dialog (2022 release wave 2 and earlier)\nIn versions 21 and earlier, the error dialog consists of the following four parts:\n1. A title (optionally)\n2. A message directed to the user\n3. A How to report this issue part that includes a Copy information to clipboard action\n4. A yes or no question as to whether the message was helpful\nThe following figure shows an example of an error dialog in the 2022 release wave 2.\n![Show an example of an error dialog in Business Central version 21.]\n## Visual elements of the error dialog (2023 release wave 1 and later)\nStarting in version 22, the error dialog consists of the following four parts:\n1. A title (optionally)\n2. A message directed to the user\n3. A Copy Details action.\n4. A yes or no question as to whether the message was helpful\nThe following figure shows an example and example error dialog in the 2023 release wave 1 or later.\n![Show an example of an error dialog in the latest Business Central version.]\n## Information in Copy details section\nThe information provided in Copy details section is meant for troubleshooting.\nHere's an example of the content of Copy details:\n```\nIf requesting support, please provide the following details to help troubleshooting:\n\nThe report couldn’t be generated, because it was empty. Adjust your filters and try again.\n\nInternal session ID:\n23fa3850-ea3c-4529-81c8-fc36d3324676\n\nApplication Insights session ID:\n2637787e-7dfc-4139-9f83-2b16883b626e\n\nClient activity id:\n9ca384ba-c4a0-eed4-d6df-267a2a40ae5f\n\nTime stamp on error:\n2023-10-04T09:05:40.7201590Z\n\nUser telemetry id:\n7979ab03-7b75-455e-beed-505c7b2649fb\n\nAL call stack:\nReport1(Report 50101).OnPostReport(Trigger) line 2 - ReportErrors by Default publisher\n```\nThe error messages supplied to the user are listed below the line `If requesting support, please provide the following details to help troubleshooting:`. Optionally, messages are in _DetailedMessage_ if the AL developer used the ErrorInfo version of the methods-auto/dialog/dialog-error-errorinfo-method.\nAfter the error messages, the platform adds more sections that can be useful when troubleshooting. The following table explains these additional sections in Copy details.\nSection|Description\nInternal session ID|An internal session ID that is used by the Azure Application Insights support team in case the issue needs to be reported as support case.\nApplication Insights session ID|The session ID. This ID is recorded in the operationId field in the telemetry logged to Azure Application Insights\nClient activity ID|An internal session ID that is used by the Azure Application Insights support team in case the issue needs to be reported as support case.\nTime stamp on error|The date and time (in UTC timezone) for when the error occurred.\nUser telemetry ID|The user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. See ../administration/telemetry-enable-application-insights#assign-a-telemetry-id-to-users.\nAL call stack|The AL stack trace in the session when the error occurred.\nThere are three pieces of information that help you better understand the error that the user experienced:\n1. The error messages\n2. Application Insights session ID (if telemetry is enabled in the environment/app)\n3. The AL stack trace\n### Sample KQL code (troubleshoot further with telemetry)\nIn telemetry, use this KQL code to help you understand what happened in the session prior to the error.\n```kql\ntraces\n| where timestamp > ago(1d) // adjust as needed\n| where operation_Id == '<insert Application Insights session ID here>'\n| project timestamp\n, message\n, eventId = customDimensions.eventId\n, customDimensions\n| order by timestamp asc\n```\n### Understanding the AL stack trace\nWhenever an operation in AL is started, the operation is added to a data structure called the _AL stack_. When the operation completes, it's removed from the AL stack. This way, the AL stack trace is then showing what AL was currently running in the session. For each operation, the object the operation comes from and details about the app are also logged.\n#### Example\nConsider the following AL stack trace:\n```\n\"Payment Application Proposal\"(Table 1293).ValidateEntryNotApplied line 12 - Base Application by Microsoft\n\"Payment Application Proposal\"(Table 1293).\"Applied - OnValidate\"(Trigger) line 17 - Base Application by Microsoft\n\"Bank Acc. Reconciliation Line\"(Table 274).DisplayApplication line 27 - Base Application by Microsoft\n\"Payment Application Review\"(Page 1287).\"ApplyEntries - OnAction\"(Trigger) line 3 - Base Application by Microsoft\n\"Payment Reconciliation Journal\"(Page 1290).\"Match Confidence - OnDrillDown\"(Trigger) line 8 - Base Application by Microsoft\n```\nThe first operation in the stack is found in the bottom line: the _Match Confidence - OnDrillDown\"(Trigger)_ from the \"Payment Reconciliation Journal\" page (object ID 1290) residing in the app _Base Application_ by the publisher _Microsoft_. This line is where execution started. The error happened in the operation in the top of the stack: _ValidateEntryNotApplied_ in the \"Payment Application Proposal\" table (object 1293) residing in the app _Base Application_ by the publisher _Microsoft_.\nYou can then use the stack trace to identify:\n1. What the user was doing (the bottom of the stack trace)\n2. Where the error happened (the top of the stack trace)\n## Error message telemetry\nWhen a user gets an error dialog while working in Business Central, a telemetry signal is also emitted, which can be logged in an Azure Application Insights resource. This telemetry data let's you identify and analyze calls to the Error method from AL code. You can also set up alerts in Azure Application Insights to get notified if many users experience errors.\nSee ../administration/telemetry-error-method-trace.\nThe error dialog also includes a yes or no question as to whether the message was helpful, similar to the following illustration:\n![Shows the error dialog and the voting actions, Yes and No, about the helpfulness of the message.]\nIf a user selects either Yes or No, a signal is emitted and recorded in Azure Application Insights. This information can help partners and developers get insight into error messages that users find hard to understand. They can then follow up with the customer to help out.\nSee Analyzing Error Message Quality Telemetry<../administration/telemetry-error-message-voting-trace>.\n## Related information\nFailure modeling and robust coding practices<devenv-robust-coding-practices>\nError message quality telemetry<../administration/telemetry-error-message-voting-trace>\n../administration/telemetry-error-method-trace\n../administration/telemetry-permission-error-trace\ndevenv-al-error-handling\ndevenv-al-control-statements\nAL Development Environment<devenv-reference-overview>"}