{"title":"ErrorInfo data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/errorinfo/errorinfo-data-type/","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/methods-auto/errorinfo/errorinfo-data-type, 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/methods-auto/errorinfo/errorinfo-data-type","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":"Provides a structure for grouping information about an error.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Static methods","slug":"static-methods","at":122,"chars":490},{"level":2,"title":"Instance methods","slug":"instance-methods","at":612,"chars":2605},{"level":2,"title":"Remarks","slug":"remarks","at":3217,"chars":2851},{"level":2,"title":"Related information","slug":"related-information","at":6068,"chars":346}],"text":"> Version: _Available or changed with runtime version 3.0._\nProvides a structure for grouping information about an error.\n## Static methods\nThe following methods are available on the ErrorInfo data type.\nMethod name|Description\nerrorinfo-create--method|Creates a new ErrorInfo object with Collectible set to true.\n[Create(Text [, Boolean] [, var Record] [, Integer] [, Integer] [, Text] [, Verbosity] [, DataClassification] [, Dictionary of [Text, Text]])](errorinfo-create-string-boolean-table-integer-integer-string-verbosity-dataclassification-dictionary[text,text]-method.md)|Creates a new ErrorInfo object.\n## Instance methods\nThe following methods are available on instances of the ErrorInfo data type.\nMethod name|Description\nAddAction(Text, Integer, Text)<errorinfo-addaction-string-integer-string-method>|Specifies an action for the error.\nAddAction(Text, Integer, Text, Text)<errorinfo-addaction-string-integer-string-string-method>|Specifies an action for the error.\nAddNavigationAction([Text])<errorinfo-addnavigationaction-string-method>|Adds a navigation action for the error.\nAddNavigationAction([Text] [, Text])<errorinfo-addnavigationaction-string-string-method>|Adds a navigation action for the error.\nerrorinfo-callstack-method|Specifies a callstack where the ErrorInfo was collected.\nCollectible([Boolean])<errorinfo-collectible-method>|Specifies if the error is collectible using ErrorBehavior.Collect.\nControlName([Text])<errorinfo-controlname-method>|Specifies the control name that the error relates to.\n[CustomDimensions([Dictionary of [Text, Text]])](errorinfo-customdimensions-method.md)|Set of additional dimensions, specified as a dictionary that relates to the error.\nerrorinfo-dataclassification-method|Specifies the classification of the error. Values include 'CustomerContent', 'EndUserIdentifiableInformation', 'EndUserPseudonymousIdentifiers', 'AccountData', 'OrganizationIdentifiableInformation', 'SystemMetadata', and 'ToBeClassified'\nDetailedMessage([Text])<errorinfo-detailedmessage-method>|Specifies a detailed error message.\nerrorinfo-errortype-method|Specifies type of the error. 'Client' shows the specified message in the client and sends it to telemetry. 'Internal' shows a generic message in the client and sends the specified message to telemetry.\nFieldNo([Integer])<errorinfo-fieldno-method>|Specifies the field ID that the error relates to.\nMessage([Text])<errorinfo-message-method>|Specifies the message that will be sent to telemetry. For a 'Client' error type, the message will also be appear in the client.\nPageNo([Integer])<errorinfo-pageno-method>|Specifies the page number that the error relates to.\nerrorinfo-recordid-method|Specifies the record ID of the record that the error relates to.\nSystemId([Guid])<errorinfo-systemid-method>|Specifies the system ID of the record that the error relates to.\nTableId([Integer])<errorinfo-tableid-method>|Specifies the table ID that the error relates to.\nTitle([Text])<errorinfo-title-method>|Specifies the title of the error.\nerrorinfo-verbosity-method|Specifies the severity level of the error. This can determine whether the error should be sent to telemetry (which is based on the trace level setting of the server).\n## Remarks\nThe different properties in the ErrorInfo data type are used in different ways for error handling, such as collectable errors, actionable errors, or what is shown in the user interface.\nUse this method...|when you want to...\nAddAction(Text, Integer, Text)<errorinfo-addaction-string-integer-string-method>|Used when making the error actionable and adding a fix-it action to the error message. See ../../devenv-actionable-errors.\nAddAction(Text, Integer, Text, Text)<errorinfo-addaction-string-integer-string-string-method>|Used when making the error actionable and adding a fix-it action to the error message. See ../../devenv-actionable-errors.\nAddNavigationAction([Text])<errorinfo-addnavigationaction-string-method>|Used when making the error actionable and adding a show-it action to the error message. See ../../devenv-actionable-errors.\nAddNavigationAction([Text] [, Text])<errorinfo-addnavigationaction-string-string-method>|Used when making the error actionable and adding a show-it action to the error message. See ../../devenv-actionable-errors.\nCollectible([Boolean])<errorinfo-collectible-method>|Make the error collectable and be part of a larger validation scenario. See Collecting errors<../../devenv-error-collection>.\nControlName([Text])<errorinfo-controlname-method>|Used when making the error actionable and adding a show-it action to the error message. See ../../devenv-actionable-errors.\n[CustomDimensions([Dictionary of [Text, Text]])](errorinfo-customdimensions-method.md)|Make the error actionable and add a fix-it action to the error message. The data in CustomDimensions can be used by the codeunit used in the action. See ../../devenv-actionable-errors.\nDetailedMessage([Text])<errorinfo-detailedmessage-method>|Add more details (hidden for the user) for the person who need to troubleshoot the error.\nFieldNo([Integer])<errorinfo-fieldno-method>|Used when making the error actionable and adding a show-it action to the error message. See ../../devenv-actionable-errors.\nMessage([Text])<errorinfo-message-method>|Show a message to the user. See User experience guidelines for errors<../../devenv-error-handling-guidelines>\nPageNo([Integer])<errorinfo-pageno-method>|Used when making the error actionable and adding a show-it action to the error message. See ../../devenv-actionable-errors.\nerrorinfo-recordid-method|Used when making the error actionable and adding a fix-it action to the error message. See ../../devenv-actionable-errors.\nSystemId([Guid])<errorinfo-systemid-method>|Used when making the error actionable and adding a show-it action to the error message. See ../../devenv-actionable-errors.\nTableId([Integer])<errorinfo-tableid-method>|Specifies the table ID that the error relates to.\nTitle([Text])<errorinfo-title-method>|Add a title to the error message. Not recommended for validation errors.\n## Related information\n../dialog/dialog-error-errorinfo-method\n../../devenv-actionable-errors\nCollecting errors<../../devenv-error-collection>\nUser experience guidelines for errors<../../devenv-error-handling-guidelines>\n../../devenv-al-error-handling\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}