{"id":1016,"date":"2026-11-23T08:30:00","date_gmt":"2026-11-23T13:30:00","guid":{"rendered":"https:\/\/www.dataflowsoln.com\/blog\/?p=1016"},"modified":"2026-11-23T08:30:00","modified_gmt":"2026-11-23T13:30:00","slug":"thanksgiving-leftovers-dead-code","status":"publish","type":"post","link":"https:\/\/dataflowsoln.com\/blog\/thanksgiving-leftovers-dead-code\/","title":{"rendered":"BC Teardown #16: Thanksgiving leftovers: dead code"},"content":{"rendered":"<p><em>Leftovers are great in the fridge. Not in your extension.<\/em><\/p>\n\n<h2>The pain<\/h2>\n<p>Your extension still carries objects from projects that ended years ago. Every update, they get compiled, tested and fixed anyway.<\/p>\n<h2>Why it happens<\/h2>\n<p>Nobody removes old code because nobody is sure what still uses it.<\/p>\n<h2>Before: What is still in there<\/h2>\n<pre style=\"background:#0c182c;color:#e6ecf5;padding:20px 24px;border-radius:10px;overflow-x:auto;font-size:15px;line-height:1.55;\"><code>MyExt objects:\n  Old EDI import (vendor long gone)\n  Promo pricing (never used)\n  Report \"Copy of Copy of Invoice\"\n  Page \"Test Page Do Not Use\"\n  Codeunit \"Temp Fix (permanent)\"<\/code><\/pre>\n<h2>After: Measure, then retire<\/h2>\n<pre style=\"background:#0c182c;color:#e6ecf5;padding:20px 24px;border-radius:10px;overflow-x:auto;font-size:15px;line-height:1.55;\"><code>1. Turn on telemetry\n   (Application Insights)\n2. See which objects actually run\n3. Confirm with the business owner\n4. Remove them in the next release\n\nLess code to compile, test and fix\nevery six months.<\/code><\/pre>\n<h2>The result<\/h2>\n<p>A leaner extension that is faster to update, cheaper to test and easier to understand.<\/p>\n<p><strong>Tip:<\/strong> Fields that hold data need an upgrade step before removal, so nothing is lost.<\/p>\n<p><a href=\"https:\/\/dataflowsoln.com\/blog\/wp-content\/uploads\/2026\/11\/BC-Teardown-16-carousel.pdf\" target=\"_blank\" rel=\"noopener\">Download this teardown as a PDF<\/a><\/p>\n<hr \/>\n<p><strong>Got a Business Central problem like this?<\/strong> Free 30 minute review of your setup. Senior Microsoft certified developers, and you talk to the person writing the code. <a href=\"https:\/\/www.dataflowsoln.com\/#contact\">Contact Dataflow Solutions<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Leftovers are great in the fridge. Not in your extension.<\/p>\n","protected":false},"author":2,"featured_media":52,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[9,11,24],"class_list":["post-1016","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bc-teardowns","tag-business-central","tag-clean-code","tag-telemetry"],"_links":{"self":[{"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/posts\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/comments?post=1016"}],"version-history":[{"count":1,"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/posts\/1016\/revisions"}],"predecessor-version":[{"id":1038,"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/posts\/1016\/revisions\/1038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/media\/52"}],"wp:attachment":[{"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/media?parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/categories?post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dataflowsoln.com\/blog\/wp-json\/wp\/v2\/tags?post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}