{"id":43127,"date":"2020-03-20T15:38:00","date_gmt":"2020-03-20T15:38:00","guid":{"rendered":"http:\/\/sticky-highjinx.flywheelsites.com\/?p=43127"},"modified":"2024-12-17T10:03:13","modified_gmt":"2024-12-17T15:03:13","slug":"x-language-chain-of-command","status":"publish","type":"post","link":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/","title":{"rendered":"D365 Development: X++ Language Chain of Command Examples"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<h2 class=\"wp-block-heading\" id=\"h-using-chain-of-command-in-x\">Using&nbsp;Chain of&nbsp;Command&nbsp;in X++<\/h2>\n\n\n\n<p>The Chain of Command pattern has been\u202favailable in\u202f<a href=\"https:\/\/envistacorp.com\/technology\/microsoft\/dynamics-365\/\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Dynamics 365<\/a>\u202ffor a\u202ffew\u202fyear (since Platform Update 9), and we\u2019re still seeing miscommunications around the topic.\u202fIn this week\u2019s blog, we will answer:\u202fWhat is it? How do I use it? When would I use it? What does it replace?\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-x-chain-of-command-in-dynamics-365\">What is the Chain of Command Pattern in X++?<\/h2>\n\n\n\n<p>In Microsoft Dynamics 365, Chain of Command (CoC) enables customization and extension of base Microsoft code. Microsoft&#8217;s base objects and code cannot be changed directly in D365, but CoC allows for the application&#8217;s capabilities to be extended.<\/p>\n\n\n\n<p>The easiest way to explain&nbsp;chain of command is that&nbsp;next() is similarly used as super(). Anything before the&nbsp;next() call can be considered a pre-event handler and anything after it&nbsp;is considered a&nbsp;post-event handler.&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>Please keep in mind that this is not creating a child class by the keyword extends. It is, however,&nbsp;allowing the developer to add business logic before or after existing method calls. It is called a chain because of the chain of events that occurs.&nbsp;Consider&nbsp;using chain of command on the update method for theSalesTable&nbsp;table. The chain would execute as follows:&nbsp;<\/p>\n\n\n\n<p>salesTable_Extension.update() before&nbsp;next() -&gt;&nbsp;salesTable.update() -&gt;&nbsp;salesTable_Extension.update() after next()&nbsp;<\/p>\n\n\n\t\t<div data-elementor-type=\"page\" data-elementor-id=\"53361\" class=\"elementor elementor-53361\" data-elementor-post-type=\"elementor_library\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b20eed2 elementor-section-stretched elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"49640\" data-id=\"b20eed2\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;stretch_section&quot;:&quot;section-stretched&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"aux-parallax-section has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a4da46b\" data-eae-slider=\"28374\" data-id=\"a4da46b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-inner-section elementor-element elementor-element-af85717 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"86936\" data-id=\"af85717\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"aux-parallax-section has_eae_slider elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-94591d3\" data-eae-slider=\"38217\" data-id=\"94591d3\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b3da8d1 elementor-grid-1 elementor-posts--align-left elementor-grid-tablet-1 elementor-grid-mobile-1 elementor-posts--thumbnail-top elementor-posts__hover-gradient elementor-widget elementor-widget-posts\" data-id=\"b3da8d1\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;cards_columns&quot;:&quot;1&quot;,&quot;cards_row_gap&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:0,&quot;sizes&quot;:[]},&quot;cards_columns_tablet&quot;:&quot;1&quot;,&quot;cards_columns_mobile&quot;:&quot;1&quot;,&quot;cards_row_gap_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;cards_row_gap_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}\" data-widget_type=\"posts.cards\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-posts-container elementor-posts elementor-posts--skin-cards elementor-grid\" role=\"list\">\n\t\t\t\t<article class=\"elementor-post elementor-grid-item post-100095 post type-post status-publish format-standard has-post-thumbnail hentry category-white-paper tag-dynamics-365 tag-microsoft\" role=\"listitem\">\n\t\t\t<div class=\"elementor-post__card\">\n\t\t\t\t<a class=\"elementor-post__thumbnail__link\" href=\"https:\/\/web.envistacorp.com\/hidden-treasures-advanced-warehousing\" tabindex=\"-1\" ><div class=\"elementor-post__thumbnail\"><img fetchpriority=\"high\" decoding=\"async\" width=\"768\" height=\"582\" src=\"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2022\/10\/image-2025-04-09T153950.688-768x582.jpg\" class=\"attachment-medium_large size-medium_large wp-image-117516\" alt=\"A man in a white shirt stands in a warehouse, holding and reviewing a clipboard. Shelves filled with boxes line the space, and another person in a yellow vest is visible in the background.\" \/><\/div><\/a>\n\t\t\t\t<div class=\"elementor-post__text\">\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/article>\n\t\t\t\t<\/div>\n\t\t\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"aux-parallax-section has_eae_slider elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-860af14\" data-eae-slider=\"77461\" data-id=\"860af14\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-32bfd00 elementor-grid-1 elementor-grid-tablet-1 elementor-grid-mobile-1 elementor-posts--thumbnail-top elementor-posts__hover-gradient elementor-widget elementor-widget-posts\" data-id=\"32bfd00\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;cards_columns&quot;:&quot;1&quot;,&quot;cards_row_gap&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:0,&quot;sizes&quot;:[]},&quot;cards_columns_tablet&quot;:&quot;1&quot;,&quot;cards_columns_mobile&quot;:&quot;1&quot;,&quot;cards_row_gap_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;cards_row_gap_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}\" data-widget_type=\"posts.cards\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-posts-container elementor-posts elementor-posts--skin-cards elementor-grid\" role=\"list\">\n\t\t\t\t<article class=\"elementor-post elementor-grid-item post-100095 post type-post status-publish format-standard has-post-thumbnail hentry category-white-paper tag-dynamics-365 tag-microsoft\" role=\"listitem\">\n\t\t\t<div class=\"elementor-post__card\">\n\t\t\t\t<a class=\"elementor-post__thumbnail__link\" href=\"https:\/\/web.envistacorp.com\/hidden-treasures-advanced-warehousing\" tabindex=\"-1\" target=\"_blank\"><div class=\"elementor-post__thumbnail\"><img decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2022\/10\/image-2025-04-09T153950.688-300x300.jpg\" class=\"attachment-medium size-medium wp-image-117516\" alt=\"A man in a white shirt stands in a warehouse, holding and reviewing a clipboard. Shelves filled with boxes line the space, and another person in a yellow vest is visible in the background.\" srcset=\"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2022\/10\/image-2025-04-09T153950.688-300x300.jpg 300w, https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2022\/10\/image-2025-04-09T153950.688-150x150.jpg 150w, https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2022\/10\/image-2025-04-09T153950.688-60x60.jpg 60w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div><\/a>\n\t\t\t\t<div class=\"elementor-post__badge\">White Paper<\/div>\n\t\t\t\t<div class=\"elementor-post__text\">\n\t\t\t\t<h3 class=\"elementor-post__title\">\n\t\t\t<a href=\"https:\/\/web.envistacorp.com\/hidden-treasures-advanced-warehousing\" target=&quot;_blank&quot;>\n\t\t\t\tHidden Treasures of Advanced Warehousing\t\t\t<\/a>\n\t\t<\/h3>\n\t\t\t\t<div class=\"elementor-post__excerpt\">\n\t\t\t<p>Make the most of Microsoft Dynamics 365\u2019s Advanced Warehousing module and gain insight into the hidden treasures to unlock value.<\/p>\n\t\t<\/div>\n\t\t\n\t\t<a class=\"elementor-post__read-more\" href=\"https:\/\/web.envistacorp.com\/hidden-treasures-advanced-warehousing\" aria-label=\"Read more about Hidden Treasures of Advanced Warehousing\" tabindex=\"-1\" target=\"_blank\">\n\t\t\tDownload\t\t<\/a>\n\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/article>\n\t\t\t\t<\/div>\n\t\t\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-when-can-i-use-x-chain-of-command\">Using X++ Chain of Command Examples<\/h2>\n\n\n\n<p>This can effectively eliminate the need to have two event handlers. For example, separate pre and post event handlers can be replaced by a single chain of command extension.&nbsp; This can be used for both protected and public methods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-fine-print\">The Fine Print<\/h3>\n\n\n\n<p>Using CoC for D365 requires a few things:\u00a0<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Decorating the class with [extensionOf(<table, form,=\"\" or=\"\" class=\"\" name=\"\">)]<\/table,>\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>You can extend tables, forms,\u00a0and classes. In today\u2019s example, we show you extending a table. Nothing really changes in extending forms and classes except what the \u2018this\u2019 keyword is in reference to.\u00a0<\/li>\n\n\n\n<li>You must use intrinsic functions\u00a0tableStr(),\u00a0formStr(), or\u00a0classStr() to identify the object you\u2019re extending.\u00a0<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Making your class final\u00a0<\/li>\n\n\n\n<li>Your method signature must match the method you\u2019re\u00a0extending\u00a0\u00a0<\/li>\n\n\n\n<li>Optional parameters are not supported.\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>If the method you\u2019re extending has optional parameters, leave off the defaulting.\u00a0\u00a0<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>The class\u00a0name\u00a0must end with _Extension\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>This is by design for the compiler to recognize classes that are using chain of command for faster compile times. It will throw a compiler error if this is not present.\u00a0<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p>As of the publishing date of this post,\u00a0Microsoft states that the order in which extensions are called is to be considered random. What does this mean? If you have several extensions on the same method, then you cannot depend on the order of your call being first or last.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Recent Updates&nbsp;<\/h2>\n\n\n\n<p>In Dynamics 365 X++ development, a <strong>replaceable attribute<\/strong> is used to mark methods that can be extended using the Chain of Command pattern without the requirement to call the next method. This allows developers to completely override the logic of the base method if needed.\u00a0<\/p>\n\n\n\n<p>How it works:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Replaceable Methods<\/strong>: When a method is marked with the [Replaceable] attribute, it indicates that the method can be extended, and the next call (which invokes the original method) is optional. This means you can choose to skip the original method&#8217;s execution based on your custom logic.\u00a0<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Conditional Execution<\/strong>: While you can skip the next call, it&#8217;s generally recommended to do so conditionally. This ensures that the base functionality is preserved unless specific conditions are met that require overriding it completely.\u00a0<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-of-pre-and-post-event-handler\">Example of pre and post event handler:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>class salesTableEventHandler \n{ \n    const static str deliveryArgName = 'deliveryDate'; \n \n    &#091;PreHandlerFor(tableStr(SalesTable), tableMethodStr(SalesTable, update))] \n    public static void SalesTable_Pre_update(XppPrePostArgs _args) \n    { \n        SalesTable salesTable = _args.getThis(); \n        \/\/ store the pre update value for later \n        _args.addArg(salesTableEventHandler::deliveryArgName, salesTable.DeliveryDate);  \n    } \n \n    &#091;PostHandlerFor(tableStr(SalesTable), tableMethodStr(SalesTable, update))] \n    public static void SalesTable_Post_update(XppPrePostArgs _args) \n    { \n        \/\/ get the stored value that we placed in args up above \n        SalesShippingDate origDeliveryDate = _args.getArg(salesTableEventHandler::deliveryArgName);  \n        SalesTable salesTable = _args.getThis(); \n \n        if (salesTable.DeliveryDate != origDeliveryDate) \n        { \n            warning(\"The delivery date has been updated, make sure the new date is attainable.\"); \n        } \n    } \n} \n <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-to-replace-event-handlers-using-chain-of-command\">How to&nbsp;replace event handlers using&nbsp;chain of command:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;ExtensionOf(tableStr(SalesTable))] \nfinal class salesTable_Extension \n{ \n    \/\/ extending an existing method, so method signature matches \n    public void update() \n    { \n        SalesShippingDate origDeliveryDate = this.DeliveryDate; \n \n        \/\/ before the next is pre-update \n        next update(); \n        \/\/ after the next is post-update \n \n        if (this.DeliveryDate != origDeliveryDate) \n        { \n            warning(\"The delivery date has been updated, make sure the new date is attainable.\"); \n        } \n    } \n}  <\/code><\/pre>\n\n\n\n<p>In this blog,\u202fwe have shown what chain of command&nbsp;is, how to use it, and what it effectively replaces in your programming needs to fit the needs of the business.\u202f&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-deep-expertise-in-dynamics-ax-and-d365-development\">enVista Does it Best<\/h2>\n\n\n\n<p>enVista is dedicated to helping the Microsoft community\u00a0by continuously sharing our in-depth knowledge of X++ and\u00a0Microsoft Dynamics 365 development.\u00a0If you are struggling with Dynamics AX or D365 development,\u00a0<a href=\"https:\/\/envistacorp.com\/contact\/\">contact us<\/a>, and we will connect you with one of our in-house experts.\u00a0\u00a0<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-text-align-center wp-element-button\" href=\"https:\/\/web.envistacorp.com\/enterprise-reporting\">Integrate Dynamics 365 Finance &amp; Operations<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Read our other topics in our D365 Developer Series:\u00a0<\/p>\n\n\n\n<p><a href=\"https:\/\/envistacorp.com\/blog\/when-why-how-to-use-data-contracts-in-dynamics-365\/\">Data Contracts<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/envistacorp.com\/blog\/d365-developer-series-syslastvalue-single-line\/\">SysLastValue in a Single Line<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/envistacorp.com\/blog\/d365-developer-series-extending-full-text\/\">Extending Full-Text<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/envistacorp.com\/blog\/d365-developer-series-merging-financial-dimensions-in-d365-fo\/\">Merging Financial Dimensions in D365 F&amp;O<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn when and how to use X++ chain of command in Microsoft Dynamics 365. <\/p>\n","protected":false},"author":22,"featured_media":46821,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","_searchwp_excluded":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[3475],"tags":[3746,3561,3519],"class_list":["post-43127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dynamics-365","tag-microsoft","tag-technology"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>X++ Language Chain of Command Design Pattern | enVista<\/title>\n<meta name=\"description\" content=\"Read on to learn how to use the X++ language in Microsoft D365 for ERP application development and customize programming with the Chain of Command pattern.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"X++ Language Chain of Command Design Pattern | enVista\" \/>\n<meta property=\"og:description\" content=\"Read on to learn how to use the X++ language in Microsoft D365 for ERP application development and customize programming with the Chain of Command pattern.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/\" \/>\n<meta property=\"og:site_name\" content=\"enVista Australia\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-20T15:38:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-17T15:03:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2020\/06\/shutterstock_648958390-1-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1673\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"enVista Marketing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"enVista Marketing\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"X++ Language Chain of Command Design Pattern | enVista","description":"Read on to learn how to use the X++ language in Microsoft D365 for ERP application development and customize programming with the Chain of Command pattern.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/","og_locale":"en_US","og_type":"article","og_title":"X++ Language Chain of Command Design Pattern | enVista","og_description":"Read on to learn how to use the X++ language in Microsoft D365 for ERP application development and customize programming with the Chain of Command pattern.","og_url":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/","og_site_name":"enVista Australia","article_published_time":"2020-03-20T15:38:00+00:00","article_modified_time":"2024-12-17T15:03:13+00:00","og_image":[{"width":2560,"height":1673,"url":"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2020\/06\/shutterstock_648958390-1-scaled.jpg","type":"image\/jpeg"}],"author":"enVista Marketing","twitter_card":"summary_large_image","twitter_misc":{"Written by":"enVista Marketing","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#article","isPartOf":{"@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/"},"author":{"name":"enVista Marketing","@id":"https:\/\/envistacorp.com\/en-au\/#\/schema\/person\/c938d19b1c760a4e1c353086018cb894"},"headline":"D365 Development: X++ Language Chain of Command Examples","datePublished":"2020-03-20T15:38:00+00:00","dateModified":"2024-12-17T15:03:13+00:00","mainEntityOfPage":{"@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/"},"wordCount":745,"commentCount":0,"publisher":{"@id":"https:\/\/envistacorp.com\/en-au\/#organization"},"image":{"@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#primaryimage"},"thumbnailUrl":"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2020\/06\/shutterstock_648958390-1-scaled.jpg","keywords":["Dynamics 365","Microsoft","Technology"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/","url":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/","name":"X++ Language Chain of Command Design Pattern | enVista","isPartOf":{"@id":"https:\/\/envistacorp.com\/en-au\/#website"},"primaryImageOfPage":{"@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#primaryimage"},"image":{"@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#primaryimage"},"thumbnailUrl":"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2020\/06\/shutterstock_648958390-1-scaled.jpg","datePublished":"2020-03-20T15:38:00+00:00","dateModified":"2024-12-17T15:03:13+00:00","description":"Read on to learn how to use the X++ language in Microsoft D365 for ERP application development and customize programming with the Chain of Command pattern.","breadcrumb":{"@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#primaryimage","url":"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2020\/06\/shutterstock_648958390-1-scaled.jpg","contentUrl":"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2020\/06\/shutterstock_648958390-1-scaled.jpg","width":2560,"height":1673,"caption":"A close-up of a hand typing on a laptop keyboard, with programming code displayed on the screen. In the blurred background, additional monitors show more lines of code."},{"@type":"BreadcrumbList","@id":"https:\/\/envistacorp.com\/en-au\/2020\/03\/20\/x-language-chain-of-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/envistacorp.com\/en-au\/"},{"@type":"ListItem","position":2,"name":"D365 Development: X++ Language Chain of Command Examples"}]},{"@type":"WebSite","@id":"https:\/\/envistacorp.com\/en-au\/#website","url":"https:\/\/envistacorp.com\/en-au\/","name":"enVista Australia","description":"Enabling Enterprise Commerce","publisher":{"@id":"https:\/\/envistacorp.com\/en-au\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/envistacorp.com\/en-au\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/envistacorp.com\/en-au\/#organization","name":"enVista Australia","url":"https:\/\/envistacorp.com\/en-au\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/envistacorp.com\/en-au\/#\/schema\/logo\/image\/","url":"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2021\/10\/enVista_Logo_White-1.png","contentUrl":"https:\/\/envistacorp.com\/en-au\/wp-content\/uploads\/sites\/4\/2021\/10\/enVista_Logo_White-1.png","width":348,"height":152,"caption":"enVista Australia"},"image":{"@id":"https:\/\/envistacorp.com\/en-au\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/envistacorp.com\/en-au\/#\/schema\/person\/c938d19b1c760a4e1c353086018cb894","name":"enVista Marketing","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/908735372279b00297ea13e45a4947cdb05e2ee7244abfcfb3ea9d263679fa53?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/908735372279b00297ea13e45a4947cdb05e2ee7244abfcfb3ea9d263679fa53?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/908735372279b00297ea13e45a4947cdb05e2ee7244abfcfb3ea9d263679fa53?s=96&d=mm&r=g","caption":"enVista Marketing"},"description":"enVista was founded by supply chain and technology experts in response to market demand for skilled consulting services. Read posts by our Thought Leaders.","url":"https:\/\/envistacorp.com\/en-au\/author\/envistamarketing\/"}]}},"_links":{"self":[{"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/posts\/43127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/comments?post=43127"}],"version-history":[{"count":0,"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/posts\/43127\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/media\/46821"}],"wp:attachment":[{"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/media?parent=43127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/categories?post=43127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/envistacorp.com\/en-au\/wp-json\/wp\/v2\/tags?post=43127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}