{"title":"Dialog.Message(Text [, Any,...]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/dialog/dialog-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/dialog/dialog-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/dialog/dialog-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":"Displays a text string in a message window.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Dialog.Message(Text [, Any,...]) Method","slug":"dialogmessagetext-any-method","at":0,"chars":2624},{"level":2,"title":"Syntax","slug":"syntax","at":146,"chars":144},{"level":2,"title":"Parameters","slug":"parameters","at":290,"chars":528},{"level":2,"title":"Remarks","slug":"remarks","at":818,"chars":601},{"level":2,"title":"Programming Guidelines","slug":"programming-guidelines","at":1419,"chars":298},{"level":2,"title":"Example","slug":"example","at":1717,"chars":773},{"level":2,"title":"Related information","slug":"related-information","at":2490,"chars":134}],"text":"# Dialog.Message(Text [, Any,...]) Method\n> Version: _Available or changed with runtime version 1.0._\nDisplays a text string in a message window.\n## Syntax\n```al\n Dialog.Message(String: Text [, Value: Any,...])\n```\n> NOTE\n> This method can be invoked without specifying the data type name.\n## Parameters\nString\nType: ../text/text-data-type\nThis string contains the text you want the system to display in the message window. Use a backslash (\\\\) to start a new line. Use percent signs (%) to insert variable values into the string. Place the percent where you want the system to substitute the variable value. The string can be a label that is enabled for multilanguage functionality.\n*[Optional] Value*\nType: ../any/any-data-type\nAny type of AL variable you want to insert into String. You can insert up to 10 values.\n## Remarks\nWhen a message statement in the AL code is executed, the message is not immediately displayed. Instead, it is displayed after the AL code is finished executing or after the AL code pauses to wait for user interaction.\nThe window is automatically sized to hold the longest line of text and the total number of lines.\nFor sessions that are started by the ../session/session-startsession-integer-integer-string-table-method, messages are recorded in the event log of the computer that is running Dynamics 365 Business Central service. The message entries have the ID 100 and type Information.\n## Programming Guidelines\nWe recommend the following guidelines for messages:\n Always end a message with a period.\n Supply the user with a message when the system has finished performing a task.\n Write the message in past tense.\nSee ../../devenv-progress-windows-message-error-and-confirm-methods.\n## Example\nThis example shows how to use the Message method.\n```al\nbegin\n        Message('App published: Hello world');\n\n        Text := 'ABCDE';\n        Number := 12345.678;\n\n        // The backslash indicates a new line.\n        // You can concatenate strings using the + operator.\n        // You can insert variable values using the % symbol.\n        Message(Text000 + Text001 + '%1\\' + Text002 + '%2\\', Number, Text);\n    end;\n\n    var\n        Text: Text;\n        Number: Decimal;\n        Text000: Label 'You can use message windows to display text and numbers: \\';\n        Text001: Label 'The number: ';\n        Text002: Label 'The text: ';\n\n```\nThe message window reads:\nYou can use message windows to display text and numbers:\nThe number: 12,345.678\nThe text: ABCDE\n## Related information\ndialog-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}