{"id":32647,"date":"2026-09-29T10:22:37","date_gmt":"2026-09-29T10:22:37","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=32647"},"modified":"2026-09-29T10:28:42","modified_gmt":"2026-09-29T10:28:42","slug":"all-types-of-message-boxes-in-sage-x3-4gl","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2026\/09\/29\/all-types-of-message-boxes-in-sage-x3-4gl\/","title":{"rendered":"All Types of Message Boxes in Sage X3 4GL"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Message boxes are an important part of <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" rel=\"noreferrer noopener\">Sage X3<\/a> 4GL development. They allow developers to communicate information, warnings, errors, questions, and choices to users during transaction processing. The right message type improves usability and makes troubleshooting easier.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Quick Reference<\/strong><\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Message Box<\/strong><\/td><td><strong>Purpose<\/strong><\/td><td><strong>Typical User Interaction<\/strong><\/td><\/tr><tr><td>Infbox<\/td><td>Information \/ success<\/td><td>OK \/ dismiss<\/td><\/tr><tr><td>Wrnbox<\/td><td>Warning<\/td><td>OK \/ Cancel \/ dismiss<\/td><\/tr><tr><td>Errbox<\/td><td>Normal application error<\/td><td>OK \/ dismiss<\/td><\/tr><tr><td>Endbox<\/td><td>Serious or fatal error<\/td><td>OK \/ dismiss<\/td><\/tr><tr><td>Qstbox<\/td><td>Yes \/ No decision<\/td><td>Returns 1 or 2<\/td><\/tr><tr><td>Selbox<\/td><td>Multiple-choice selection<\/td><td>Returns selected line number<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>1.<\/strong> <strong>Infbox &#8211; Information Message<\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Use Infbox when you need to display a non-critical informational message, such as successful completion, a status update, or a helpful notification.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Syntax<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Infbox MESSAGE_LIST<br>Infbox MESSAGE_LIST Titled TITLE<br>Infbox MESSAGE_LIST Titled TITLE Sleep TIME<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Basic example<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Infbox &#8220;Process completed successfully.&#8221;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Using a variable<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Local Char MSG(250)<br>MSG = &#8220;E-Way Bill generated successfully.&#8221;<br>Infbox MSG<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Multiple lines<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Infbox &#8220;E-Way Bill generated successfully.&#8221;,<br>&amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;E-Way Bill No: 123456789012&#8221;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>With title and timeout<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Infbox &#8220;Process completed successfully.&#8221; Titled &#8220;Information&#8221; Sleep 10<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>New Stuff:<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2026\/09\/23\/how-to-set-default-status-on-miscellaneous-receipt-lines-in-sage-x3\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2026\/09\/23\/how-to-set-default-status-on-miscellaneous-receipt-lines-in-sage-x3\/\" rel=\"noreferrer noopener\">How to set default status on Miscellaneous receipt lines in Sage X3<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-8.png\" target=\"_blank\" rel=\"noreferrer \nnoopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-8.png\" alt=\"Figure 1 : Sage X3 Infbox \u2014 Information Message\"><\/a><\/center>\n<font size=\"2\"><center>Figure 1 : Sage X3 Infbox \u2014 Information Message<\/center><\/font>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>2. Wrnbox &#8211; Warning Message<\/strong><strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Use Wrnbox when the user should be alerted to a condition that may be undesirable, but does not necessarily stop processing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Syntax<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Wrnbox MESSAGE_LIST<br>Wrnbox MESSAGE_LIST Titled TITLE<br>Wrnbox MESSAGE_LIST Titled TITLE Sleep TIME<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Example<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If CREDIT &gt; CREDIT_LIMIT<br>&nbsp;&nbsp;&nbsp;&nbsp;Wrnbox &#8220;Customer credit limit exceeded.&#8221; Titled &#8220;Credit Warning&#8221;<br>Endif<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-2.png\" target=\"_blank\" rel=\"noreferrer \nnoopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-2.png\" alt=\"Figure 2 : Sage X3 Wrnbox \u2014 Warning Message\"><\/a><\/center>\n<font size=\"2\"><center>Figure 2 : Sage X3 Wrnbox \u2014 Warning Message<\/center><\/font>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>3. Errbox &#8211; Error Message<\/strong><strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Use Errbox for normal application, validation, or business-rule errors. Displaying an Errbox does not by itself define what your program does next; transaction-control logic must still be implemented where appropriate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Syntax<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Errbox MESSAGE_LIST<br>Errbox MESSAGE_LIST Titled TITLE<br>Errbox MESSAGE_LIST Titled TITLE Sleep TIME<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Validation example<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If [M:SOH0]BPCORD = &#8220;&#8221;<br>&nbsp;&nbsp;&nbsp;&nbsp;Errbox &#8220;Customer is mandatory.&#8221;<br>&nbsp;&nbsp;&nbsp;&nbsp;GOK = 0<br>Endif<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Another example<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If QTY &lt;= 0<br>&nbsp;&nbsp;&nbsp;&nbsp;Errbox &#8220;Quantity must be greater than zero.&#8221; Titled &#8220;Validation Error&#8221; Sleep 10<br>Endif<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-9.png\" target=\"_blank\" rel=\"noreferrer \nnoopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-9.png\" alt=\"Figure3: Sage X3 Errbox \u2014 Validation Error\"><\/a><\/center>\n<font size=\"2\"><center>Figure3: Sage X3 Errbox \u2014 Validation Error<\/center><\/font>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>4. Endbox &#8211; Critical \/ Fatal Error<\/strong><strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Use Endbox for serious or blocking failures where continuing the operation is not reasonably appropriate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Syntax<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Endbox MESSAGE_LIST<br>Endbox MESSAGE_LIST Titled TITLE<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Example<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If FILE_STATUS &lt;&gt; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;Endbox &#8220;Required file could not be opened.&#8221; Titled &#8220;Fatal Error&#8221; Sleep 15<br>Endif<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Errbox vs Endbox<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Errbox &nbsp;= &nbsp;Something is wrong.<br>Endbox &nbsp;= &nbsp;A serious failure occurred; processing should not reasonably continue.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-4.png\" target=\"_blank\" rel=\"noreferrer \nnoopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-4.png\" alt=\"Figure4: Sage X3 Endbox \u2014 Fatal Error\"><\/a><\/center>\n<font size=\"2\"><center>Figure4: Sage X3 Endbox \u2014 Fatal Error<\/center><\/font>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>5. Qstbox &#8211; Yes \/ No Question<\/strong><strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Use Qstbox when the program needs an explicit Yes\/No response. The returned value is 1 for Yes and 2 for No; a timeout also returns 2.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Syntax<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Qstbox MESSAGE_LIST Using ANSWER<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Example<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Local Integer ANSWER<br>Qstbox &#8220;Do you want to continue?&#8221; Using ANSWER<br><br>If ANSWER = 1<br>&nbsp;&nbsp;&nbsp;&nbsp;Infbox &#8220;User selected Yes.&#8221;<br>Else<br>&nbsp;&nbsp;&nbsp;&nbsp;Infbox &#8220;User selected No.&#8221;<br>Endif<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Delete confirmation<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Local Integer ANSWER<br><br>Qstbox &#8220;Are you sure you want to delete this record?&#8221; Titled &#8220;Delete Confirmation&#8221; Using ANSWER<br><br>If ANSWER = 1<br>&nbsp;&nbsp;&nbsp;&nbsp;# Delete processing<br>Endif<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-5.png\" target=\"_blank\" rel=\"noreferrer \nnoopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-5.png\" alt=\"Figure5: Sage X3 Qstbox \u2014 Delete Confirmation\"><\/a><\/center>\n<font size=\"2\"><center>Figure5: Sage X3 Qstbox \u2014 Delete Confirmation<\/center><\/font>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>6. Selbox &#8211; Selection List<\/strong><strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Use Selbox when the user must choose one option from several alternatives. The returned value is the selected line number.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Syntax<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Selbox CHOICE_LIST Using ANSWER<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Example<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Local Integer CHOICE<br><br>Selbox &#8220;Create&#8221;, &#8220;Update&#8221;, &#8220;Delete&#8221; Titled &#8220;Select Operation&#8221; Using CHOICE<br><br>Case CHOICE<br><br>When 1<br>&nbsp;&nbsp;&nbsp;&nbsp;Infbox &#8220;Create selected.&#8221;<br><br>When 2<br>&nbsp;&nbsp;&nbsp;&nbsp;Infbox &#8220;Update selected.&#8221;<br><br>When 3<br>&nbsp;&nbsp;&nbsp;&nbsp;Infbox &#8220;Delete selected.&#8221;<br><br>Endcase<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-6.png\" target=\"_blank\" rel=\"noreferrer \nnoopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2026\/09\/image-6.png\" alt=\"Figure6: Sage X3 Selbox \u2014 Select Operation\"><\/a><\/center>\n<font size=\"2\"><center>Figure6: Sage X3 Selbox \u2014 Select Operation<\/center><\/font>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Using Dynamic Values in Message Boxes<\/strong><strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Message boxes become more useful when they include values from variables or fields. String concatenation and num$() can be used to build informative messages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Local Char MSG(250)<br>MSG = &#8220;Customer &#8221; &#8211; [M:SOH0]BPCORD &#8211; &#8221; is not authorized.&#8221;<br>Errbox MSG<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Local Integer QTY<br>QTY = 100<br>Infbox &#8220;Quantity entered: &#8221; &#8211; num$(QTY)<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Localized Messages with mess()<\/strong><strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">In a multilingual Sage X3 environment, message resources can be used so the message is maintained in the Sage X3 message dictionary rather than hard-coded directly in the script.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Infbox mess(12, 501, 1)<br>Errbox mess(12, 501, 1)Choose the appropriate message-resource identifiers for your application and environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Message boxes are an important part of Sage X3 4GL development. They allow developers to communicate information, warnings, errors, questions, and choices to users during transaction processing. The right message type improves usability and makes troubleshooting easier. Quick Reference Message Box Purpose Typical User Interaction Infbox Information \/ success OK \/ dismiss Wrnbox Warning OK\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2026\/09\/29\/all-types-of-message-boxes-in-sage-x3-4gl\/\">Read More: All Types of Message Boxes in Sage X3 4GL &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20,698,727,4730,1586,4731],"class_list":["post-32647","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-4gl","tag-endbox","tag-errbox","tag-infbox","tag-qstbox","tag-wrnbox"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/32647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=32647"}],"version-history":[{"count":18,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/32647\/revisions"}],"predecessor-version":[{"id":32679,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/32647\/revisions\/32679"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=32647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=32647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=32647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}