{"title":"ErrorInfo.Message([Text]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/errorinfo/errorinfo-message-method/","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-message-method, 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-message-method","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":"Specifies the message that will be sent to telemetry.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"ErrorInfo.Message([Text]) Method","slug":"errorinfomessagetext-method","at":0,"chars":1880},{"level":2,"title":"Syntax","slug":"syntax","at":223,"chars":136},{"level":2,"title":"Parameters","slug":"parameters","at":359,"chars":179},{"level":2,"title":"Return Value","slug":"return-value","at":538,"chars":104},{"level":2,"title":"Remarks","slug":"remarks","at":642,"chars":541},{"level":2,"title":"Example","slug":"example","at":1183,"chars":451},{"level":2,"title":"Related information","slug":"related-information","at":1634,"chars":246}],"text":"# ErrorInfo.Message([Text]) Method\n> Version: _Available or changed with runtime version 3.0._\nSpecifies the message that will be sent to telemetry. For a 'Client' error type, the message will also be appear in the client.\n## Syntax\n```al\n[Message := ]  ErrorInfo.Message([Message: Text])\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nErrorInfo\nType: errorinfo-data-type\nAn instance of the errorinfo-data-type data type.\n*[Optional] Message*\nType: ../text/text-data-type\nThe message of the ErrorInfo\n## Return Value\n*[Optional] Message*\nType: ../text/text-data-type\nThe current message of the ErrorInfo.\n## Remarks\nSet the Message property on error dialogs that are presented to the user. For advice on how to use the title to describe what's wrong and enable the user to quickly scan the meaning of the error, see User experience guidelines for errors<../../devenv-error-handling-guidelines#error-message-body>.\nSetting the Message property on error dialogs is required. For more information on how to express error messages, see Error message best practices - what to say?<../../devenv-error-handling-guidelines#error_message_best_practices>.\n## Example\n```al\nvar\n    dimension: Text[30];\n    vendorCode: Text[30];\n    MyErrorInfo: ErrorInfo;\nbegin\n    // set up the error info object\n    MyErrorInfo.Message(\n        StrSubstNo('The dimension value must be blank for the dimension %1 for Vendor %2', dimension, vendorCode)\n    );\n    MyErrorInfo.DetailedMessage('Add some text to help the person troubleshooting this error.');\n    // maybe set more properties\n\n    Error(MyErrorInfo);\nend\n```\n## Related information\nerrorinfo-data-type\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>"}