{"id":1396,"date":"2024-01-24T06:49:01","date_gmt":"2024-01-24T06:49:01","guid":{"rendered":"https:\/\/www.aegissofttech.com\/insights\/\/?p=1396"},"modified":"2025-09-24T11:03:13","modified_gmt":"2025-09-24T11:03:13","slug":"hide-messages-in-sales-documents","status":"publish","type":"post","link":"https:\/\/www.aegissofttech.com\/insights\/hide-messages-in-sales-documents\/","title":{"rendered":"How to hide messages in Sales Documents while validating Shipment Date"},"content":{"rendered":"<p><strong>Hide &#8211; \u201cShipment Date xx\/xx\/xx is before work date xx\/xx\/xx\u201d note<\/strong><\/p>\n<h2>Step-by-Step Guide: Hide Messages in Sales Documents When Validating Shipment Date:<\/h2>\n<p>Build a <a href=\"https:\/\/answers.sap.com\/questions\/2364505\/validating-the-requested-delivery-date-in-sales-or.html\" rel=\"nofollow noopener\" target=\"_blank\"><strong>Sales Order and validate the Shipment Date<\/strong><\/a> with a too-early date of workdate.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-1397 size-full alignnone\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step1.jpg\" alt=\"step1\" width=\"624\" height=\"302\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step1.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step1-300x145.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><br \/>\nHere, the Workdate is 09\/12\/2023 and I put on a timely Shipment Date i.e. 09\/05\/2023.<\/p>\n<p>*** The proof\/monitory message will be shown only when an item is validated in the Sales Line, not while Shipment Date validation.<\/p>\n<p>Validation Dialog when the Shipment Date is earlier than the Workdate.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-1398 size-full alignnone\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step2.jpg\" alt=\"step2\" width=\"572\" height=\"200\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step2.jpg 572w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step2-300x105.jpg 300w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/p>\n<p>I attempt with the My Business Central setup page.<\/p>\n<p>Go to Business Central Web Client -&gt; click on Setup<\/p>\n<p><img decoding=\"async\" class=\"wp-image-1399 size-full alignnone\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step3.jpg\" alt=\"step3\" width=\"624\" height=\"144\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step3.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step3-300x69.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1400 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step4.jpg\" alt=\"step4\" width=\"217\" height=\"284\" title=\"\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1401 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step5.jpg\" alt=\"step5\" width=\"446\" height=\"281\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step5.jpg 446w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step5-300x189.jpg 300w\" sizes=\"(max-width: 446px) 100vw, 446px\" \/><\/p>\n<p>Snap-on modified when I collected notifications and explored for Workdate prompt. Turn off the allowed button and try again.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1402 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step6.jpg\" alt=\"step6\" width=\"624\" height=\"313\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step6.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step6-300x150.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<h3>Sales Method<\/h3>\n<p>Sales System \u2013 with Shipment Date too early than Workdate.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1403 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step7.jpg\" alt=\"step7\" width=\"603\" height=\"375\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step7.jpg 603w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step7-300x187.jpg 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/p>\n<p>Smooth acquired the message \u2013 Shipment Date 09\/05\/23 is before workdate 09\/12\/23.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1404 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step8.jpg\" alt=\"step8\" width=\"570\" height=\"198\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step8.jpg 570w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step8-300x104.jpg 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/p>\n<p>Allow dig into the language now.<\/p>\n<p>In Sales underline, I explored with \u2013 before the work date and set up the under label Text014.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1405 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step9.jpg\" alt=\"step9\" width=\"624\" height=\"291\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step9.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step9-300x140.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p><strong>Text014: Label &#8216;%1 %2 is before work date %3&#8217;;<\/strong><\/p>\n<p>Search with \u2013 Text014 in Sales underLine and you can notice that Text014 is used in an event named \u201cCheckShipmentDateBeforeWorkDate\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1406 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step10.jpg\" alt=\"step10\" width=\"624\" height=\"311\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step10.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step10-300x150.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p><code>local procedure CheckShipmentDateBeforeWorkDate()<br \/>\nvar<br \/>\nIsHandled: Boolean;<br \/>\nbegin<br \/>\nIsHandled := false;<br \/>\nOnBeforeCheckShipmentDateBeforeWorkDate(Rec, xRec, HasBeenShown, IsHandled);<br \/>\nif IsHandled then<br \/>\nexit;<br \/>\nif (\"Shipment Date\"&lt; WorkDate()) and HasTypeToFillMandatoryFields() then<br \/>\nif not (GetHideValidationDialog() or HasBeenShown) and GuiAllowed then begin<br \/>\nMessage(<br \/>\nText014,<br \/>\nFieldCaption(\"Shipment Date\"), \"Shipment Date\", WorkDate());<br \/>\nHasBeenShown := true;<br \/>\nend;<br \/>\nend;<\/code><\/p>\n<p>So the core process to hide the message is the \u201cGetHideValidationDialog\u201d function<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1407 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step11.jpg\" alt=\"step11\" width=\"598\" height=\"145\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step11.jpg 598w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step11-300x73.jpg 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><br \/>\nIf we can set HideValidationDialog as true, we can pass over the message here. Let\u2019s find the method!<\/p>\n<p>Adept is a procedure to set the value of HideValidationDialog called \u201cSetHideValidationDialog\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1408 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step12.jpg\" alt=\"step12\" width=\"624\" height=\"121\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step12.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step12-300x58.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p><code>procedure SetHideValidationDialog(NewHideValidationDialog: Boolean)<br \/>\nbegin<br \/>\nHideValidationDialog := NewHideValidationDialog;<br \/>\nOnAfterSetHideValidationDialog(Rec, NewHideValidationDialog);<br \/>\nend;<\/code><\/p>\n<p>We are required to set the value as true before the Shipment date is validated and so the preferred utilizes the OnBeforeValidate activate of Shipment Date control to hide this dialog.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1409 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step13.jpg\" alt=\"step13\" width=\"624\" height=\"344\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step13.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step13-300x165.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p><code>tableextension 50001 \"SalesLineExt\" extends \"Sales Line\"<br \/>\n{<br \/>\nfields<br \/>\n{<br \/>\nmodify(\"Shipment Date\")<br \/>\n{<br \/>\ntrigger OnBeforeValidate()<br \/>\nbegin<br \/>\nRec.SetHideValidationDialog(true);<br \/>\nend;<br \/>\n}<br \/>\n}<br \/>\n}<\/code><\/p>\n<p>If HideValidationDialog is true &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1410 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step14.jpg\" alt=\"step14\" width=\"624\" height=\"138\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step14.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step14-300x66.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>we can at present pass over the message statement \u2013<\/p>\n<p>\u201cShipment Date 09\/05\/23 is prior to work date 09\/12\/23.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1411 size-full\" src=\"https:\/\/www.aegissofttech.com\/insights\/\/wp-content\/uploads\/2024\/01\/step15.jpg\" alt=\"step15\" width=\"624\" height=\"324\" title=\"\" srcset=\"https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step15.jpg 624w, https:\/\/www.aegissofttech.com\/insights\/wp-content\/uploads\/2024\/01\/step15-300x156.jpg 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>Ultimately, the best approach depends on your specific needs and context. Weigh the risks and benefits carefully before choosing to hide validation messages in <a href=\"https:\/\/www.aegissofttech.com\/dynamics-365\/business-central-consulting\" target=\"_blank\" rel=\"noopener\">Microsoft Dynamics 365 Business Central<\/a>.<\/p>\n<p>Remember, prioritizing transparency with customers is crucial in most situations. Consider alternative communication channels to inform them of any concerns regarding the shipment date without cluttering the sales document.<\/p>\n","protected":false},"excerpt":{"rendered":" ","protected":false},"author":9,"featured_media":1412,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[124],"tags":[294,295],"class_list":["post-1396","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business-central","tag-hide-messages-in-sales-documents","tag-validating-shipment-date"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts\/1396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/comments?post=1396"}],"version-history":[{"count":4,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts\/1396\/revisions"}],"predecessor-version":[{"id":14277,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts\/1396\/revisions\/14277"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/media\/1412"}],"wp:attachment":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/media?parent=1396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/categories?post=1396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/tags?post=1396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}