{"id":428,"date":"2020-11-30T12:22:51","date_gmt":"2020-11-30T12:22:51","guid":{"rendered":"http:\/\/fredborg.org\/?p=428"},"modified":"2020-12-23T20:45:48","modified_gmt":"2020-12-23T20:45:48","slug":"dark-releases-in-business-central","status":"publish","type":"post","link":"https:\/\/fredborg.org\/?p=428","title":{"rendered":"Dark releases in Business Central"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">As more and more people move towards Business Central, people are also looking at Azure DevOps and not only for source control and Azure Pipelines, but also as a project management tool. So, I thought I would take the opportunity to talk a little bit about some of the corner stones in DevOps, because DevOps is not some fancy term that Microsoft has invented for the product, but it is a term used to cover a set of tools that can help you run a very lean software release cycle. In this post I will take you through the concept of dark&nbsp;releases &#x1f631;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, what are dark releases and why do we need them?&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The concept behind dark releases is that you release code to your production, without it being visible or enabled to all users, it is a way to let your super users test new functionality before you make it widely available, the difference behind doing it this way vs testing in a Test environment; is that by using dark releases you will let the users test on real data, and once it is accepted you would be able to make it widely available by setting a Boolean field to true in your setup &#x1f642;. This kind of setup will let you make small releases to production and run an agile release cycle instead of doing a big bang implementation&nbsp;&#x1f32a;&nbsp;and let us be honest;&nbsp;one&nbsp;of the most difficult things to do in software development is to get our users to test our solutions. But by using dark releases you are \u201cforcing\u201d your super users to test your code, and once they feel that it is ready, either a super user or a release manager can enable the code for everyone. &#x1f929;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, in short dark releases are a way to create small releases and improve the stability of the code that will be released to the public by letting some super users test the code in production, and by doing so also removing the old \u201cbut it works in test\u201d &#x1f928;. And by allowing small releases you can also live up to the CI\/CD way of thinking.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To start using dark releases in BC \/ NAV you first need to setup a couple of things the first is that you need to create a setup table, this table should consist of a module name and an option field consisting of at least three options Not Active, Beta, Active. If you are using\u00a0BC\u00a0I would suggest that you use\u00a0enums\u00a0so your code would look something like this:\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The Modules Enum<\/strong>\u00a0<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nenum 50100 &quot;RITModules&quot; \n{ \n    Extensible = true; \n    value(0; &quot;&quot;) \n\n    { \n\n        Caption = &#039;&#039;; \n\n    } \n\n    value(1; &quot;Module 1&quot;) \n\n    { \n\n        Caption = &#039;Module 1&#039;; \n\n    } \n\n    value(2; &quot;Module 2&quot;) \n\n    { \n\n        Caption = &#039;Module 2&#039;; \n\n    } \n} \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>The Module Status Enum<\/strong>\u00a0<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nenum 50101 &quot;RITModule Status&quot; \n\n{ \n\n    Extensible = true; \n\n    value(0; &quot;Not Active&quot;) \n\n    { \n\n        Caption = &#039;Not Active&#039;; \n\n    } \n\n    value(1; Beta) \n\n    { \n\n        Caption = &#039;Beta&#039;; \n\n    } \n\n    value(2; Active) \n\n    { \n\n        Caption = &#039;Active&#039;; \n\n    } \n\n} \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>The Modules table<\/strong>\u00a0<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\ntable 50100 &quot;RITModules&quot; \n{ \n\n    Caption = &#039;Modules&#039;; \n    DataClassification = ToBeClassified; \n\n    fields \n\n    { \n\n        field(1; Module; Enum RITModules) \n\n        { \n\n            Caption = &#039;Module&#039;; \n            DataClassification = SystemMetadata; \n\n        } \n\n        field(2; Status; Enum &quot;RITModule Status&quot;) \n\n        { \n\n            Caption = &#039;Status&#039;; \n            DataClassification = SystemMetadata; \n\n        } \n\n    } \n\n    keys \n\n    { \n\n        key(PK; Module) \n\n        { \n\n            Clustered = true; \n\n        } \n\n    } \n\n} \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>The Page<\/strong>\u00a0<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\npage 50100 &quot;RITModules&quot; \n\n{ \n    ApplicationArea = All; \n    Caption = &#039;Modules&#039;; \n    PageType = List; \n    SourceTable = RITModules; \n    UsageCategory = Administration; \n\n    Layout \n    { \n        area(content) \n        { \n            repeater(General) \n            { \n                field(Module; Rec.Module) \n                { \n                    ApplicationArea = All; \n                } \n\n                field(Status; Rec.Status) \n\n                { \n                    ApplicationArea = All; \n                } \n            } \n\n        } \n\n    } \n\n} \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">So,\u00a0you would get something like this:\u00a0<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"232\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/msedge_hUbliqlNIV.png\" alt=\"\" class=\"wp-image-430\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/msedge_hUbliqlNIV.png 903w, https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/msedge_hUbliqlNIV-300x77.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/msedge_hUbliqlNIV-768x197.png 768w\" sizes=\"auto, (max-width: 903px) 100vw, 903px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Next you should add a new field to your user setup where you can setup if a user is a super user, once done it is important that you write the code in all your modules to check what status it has in the modules table, and to check if the current user&nbsp;can&nbsp;see modules in beta.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using this&nbsp;approach,&nbsp;it will also set a high standard for your code to be written as isolated as possible so you can encapsulate everything in if statements.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I hope this post, got you a little bit more confident with using dark releases and I know it might be a big mouthful for many people to start writing the code so isolated, but once you get into the habit it really is a great way to structure your code, well that was it for this post, stay safe.&nbsp;&#x1f637;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As more and more people move towards Business Central, people are also looking at Azure DevOps and not only for&#8230; <a class=\"read-more\" href=\"https:\/\/fredborg.org\/?p=428\" rel=\"nofollow\"> Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":433,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,1],"tags":[],"class_list":["post-428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business-central","category-uncategorized","shapla-grid-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Dark releases in Business Central - Fredborg<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fredborg.org\/?p=428\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dark releases in Business Central - Fredborg\" \/>\n<meta property=\"og:description\" content=\"As more and more people move towards Business Central, people are also looking at Azure DevOps and not only for... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fredborg.org\/?p=428\" \/>\n<meta property=\"og:site_name\" content=\"Fredborg\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-30T12:22:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-23T20:45:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"dfredborg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dfredborg\" \/>\n<meta name=\"twitter:site\" content=\"@dfredborg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dfredborg\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fredborg.org\/?p=428#article\",\"isPartOf\":{\"@id\":\"https:\/\/fredborg.org\/?p=428\"},\"author\":{\"name\":\"dfredborg\",\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\"},\"headline\":\"Dark releases in Business Central\",\"datePublished\":\"2020-11-30T12:22:51+00:00\",\"dateModified\":\"2020-12-23T20:45:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fredborg.org\/?p=428\"},\"wordCount\":629,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\"},\"image\":{\"@id\":\"https:\/\/fredborg.org\/?p=428#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png\",\"articleSection\":[\"Business Central\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fredborg.org\/?p=428#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fredborg.org\/?p=428\",\"url\":\"https:\/\/fredborg.org\/?p=428\",\"name\":\"Dark releases in Business Central - Fredborg\",\"isPartOf\":{\"@id\":\"https:\/\/fredborg.org\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fredborg.org\/?p=428#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fredborg.org\/?p=428#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png\",\"datePublished\":\"2020-11-30T12:22:51+00:00\",\"dateModified\":\"2020-12-23T20:45:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fredborg.org\/?p=428#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fredborg.org\/?p=428\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fredborg.org\/?p=428#primaryimage\",\"url\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png\",\"contentUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png\",\"width\":1536,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fredborg.org\/?p=428#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fredborg.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dark releases in Business Central\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fredborg.org\/#website\",\"url\":\"https:\/\/fredborg.org\/\",\"name\":\"Fredborg\",\"description\":\"Business Central and Azure\",\"publisher\":{\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fredborg.org\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\",\"name\":\"dfredborg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png\",\"contentUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png\",\"width\":256,\"height\":256,\"caption\":\"dfredborg\"},\"logo\":{\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:fredborg.org\",\"https:\/\/www.linkedin.com\/in\/dfredborg\/\",\"https:\/\/x.com\/dfredborg\",\"https:\/\/www.youtube.com\/channel\/UCUNZglLDMjBlOK_T9JtI8UA\"],\"url\":\"https:\/\/fredborg.org\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dark releases in Business Central - Fredborg","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:\/\/fredborg.org\/?p=428","og_locale":"en_US","og_type":"article","og_title":"Dark releases in Business Central - Fredborg","og_description":"As more and more people move towards Business Central, people are also looking at Azure DevOps and not only for... Read more","og_url":"https:\/\/fredborg.org\/?p=428","og_site_name":"Fredborg","article_published_time":"2020-11-30T12:22:51+00:00","article_modified_time":"2020-12-23T20:45:48+00:00","og_image":[{"width":1536,"height":768,"url":"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png","type":"image\/png"}],"author":"dfredborg","twitter_card":"summary_large_image","twitter_creator":"@dfredborg","twitter_site":"@dfredborg","twitter_misc":{"Written by":"dfredborg","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fredborg.org\/?p=428#article","isPartOf":{"@id":"https:\/\/fredborg.org\/?p=428"},"author":{"name":"dfredborg","@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d"},"headline":"Dark releases in Business Central","datePublished":"2020-11-30T12:22:51+00:00","dateModified":"2020-12-23T20:45:48+00:00","mainEntityOfPage":{"@id":"https:\/\/fredborg.org\/?p=428"},"wordCount":629,"commentCount":0,"publisher":{"@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d"},"image":{"@id":"https:\/\/fredborg.org\/?p=428#primaryimage"},"thumbnailUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png","articleSection":["Business Central"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fredborg.org\/?p=428#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fredborg.org\/?p=428","url":"https:\/\/fredborg.org\/?p=428","name":"Dark releases in Business Central - Fredborg","isPartOf":{"@id":"https:\/\/fredborg.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fredborg.org\/?p=428#primaryimage"},"image":{"@id":"https:\/\/fredborg.org\/?p=428#primaryimage"},"thumbnailUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png","datePublished":"2020-11-30T12:22:51+00:00","dateModified":"2020-12-23T20:45:48+00:00","breadcrumb":{"@id":"https:\/\/fredborg.org\/?p=428#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fredborg.org\/?p=428"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fredborg.org\/?p=428#primaryimage","url":"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png","contentUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2020\/11\/DarkRelease.png","width":1536,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/fredborg.org\/?p=428#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fredborg.org\/"},{"@type":"ListItem","position":2,"name":"Dark releases in Business Central"}]},{"@type":"WebSite","@id":"https:\/\/fredborg.org\/#website","url":"https:\/\/fredborg.org\/","name":"Fredborg","description":"Business Central and Azure","publisher":{"@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fredborg.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d","name":"dfredborg","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fredborg.org\/#\/schema\/person\/image\/","url":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png","contentUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png","width":256,"height":256,"caption":"dfredborg"},"logo":{"@id":"https:\/\/fredborg.org\/#\/schema\/person\/image\/"},"sameAs":["https:fredborg.org","https:\/\/www.linkedin.com\/in\/dfredborg\/","https:\/\/x.com\/dfredborg","https:\/\/www.youtube.com\/channel\/UCUNZglLDMjBlOK_T9JtI8UA"],"url":"https:\/\/fredborg.org\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=428"}],"version-history":[{"count":3,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts\/428\/revisions"}],"predecessor-version":[{"id":434,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts\/428\/revisions\/434"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/media\/433"}],"wp:attachment":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}