# ErrorInfo.Message([Text]) Method
> Version: _Available or changed with runtime version 3.0._
Specifies the message that will be sent to telemetry. For a 'Client' error type, the message will also be appear in the client.
## Syntax
```al
[Message := ]  ErrorInfo.Message([Message: Text])
```
> NOTE
> This method can be invoked using property access syntax.
## Parameters
ErrorInfo
Type: errorinfo-data-type
An instance of the errorinfo-data-type data type.
*[Optional] Message*
Type: ../text/text-data-type
The message of the ErrorInfo
## Return Value
*[Optional] Message*
Type: ../text/text-data-type
The current message of the ErrorInfo.
## Remarks
Set 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>.
Setting 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>.
## Example
```al
var
    dimension: Text[30];
    vendorCode: Text[30];
    MyErrorInfo: ErrorInfo;
begin
    // set up the error info object
    MyErrorInfo.Message(
        StrSubstNo('The dimension value must be blank for the dimension %1 for Vendor %2', dimension, vendorCode)
    );
    MyErrorInfo.DetailedMessage('Add some text to help the person troubleshooting this error.');
    // maybe set more properties

    Error(MyErrorInfo);
end
```
## Related information
errorinfo-data-type
User experience guidelines for errors<../../devenv-error-handling-guidelines>
../../devenv-al-error-handling
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

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. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/errorinfo/errorinfo-message-method/
