<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eduard2207</title>
    <description>The latest articles on DEV Community by Eduard2207 (@eduard2207).</description>
    <link>https://dev.to/eduard2207</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4269157%2Ff4a3b8be-4d2d-43bf-9127-56475d675943.png</url>
      <title>DEV Community: Eduard2207</title>
      <link>https://dev.to/eduard2207</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eduard2207"/>
    <language>en</language>
    <item>
      <title>From an AL object's structure to its source: inspecting Business Central .app packages in VS Code</title>
      <dc:creator>Eduard2207</dc:creator>
      <pubDate>Fri, 27 Nov 2026 14:17:26 +0000</pubDate>
      <link>https://dev.to/eduard2207/from-an-al-objects-structure-to-its-source-inspecting-business-central-app-packages-in-vs-code-496o</link>
      <guid>https://dev.to/eduard2207/from-an-al-objects-structure-to-its-source-inspecting-business-central-app-packages-in-vs-code-496o</guid>
      <description>&lt;p&gt;When working with Microsoft Dynamics 365 Business Central, I often need to understand an object delivered inside a dependency package before I know which part of its source code to read. A table can contain many fields, triggers, procedures and events; opening a source file is not always the fastest way to locate the declaration that matters.&lt;/p&gt;

&lt;p&gt;This article walks through a structure-first approach using Table 3 &lt;strong&gt;Payment Terms&lt;/strong&gt; from the Microsoft Base Application. I use AL Structure Explorer, an extension I developed at SAN Business Solutions, as the example navigator. The technique is useful whenever you have permission to inspect an AL package locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start with the package catalog
&lt;/h2&gt;

&lt;p&gt;An &lt;code&gt;.app&lt;/code&gt; is a Business Central application package. Before inspecting an object, establish the context: which application and version does the package represent? A familiar object ID can appear in different environments or versions, so recording the package identity helps make an investigation repeatable.&lt;/p&gt;

&lt;p&gt;The catalog shown below lets me narrow the package by object type, ID or name. For this example, choose &lt;strong&gt;Table&lt;/strong&gt; and locate ID &lt;strong&gt;3&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7mn279p64rpdr6bhs7d2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7mn279p64rpdr6bhs7d2.png" alt="Package metadata and object catalog with AL object type filters" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Read the structure before the implementation
&lt;/h2&gt;

&lt;p&gt;Think of an AL object as a hierarchy of declarations, not just a list of lines. Tables, for example, may contain fields, keys, field groups, triggers, procedures and events. Selecting one branch reduces the amount of source code that has to be examined.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc7jxwvlm8add0wdh60gw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc7jxwvlm8add0wdh60gw.png" alt="Example structure tree for Table 18 Customer, including fields, properties and triggers" width="800" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The screenshot uses Table 18 &lt;strong&gt;Customer&lt;/strong&gt; to illustrate the hierarchy. For the Payment Terms exercise, follow this path instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Table 3 Payment Terms
└── Procedures
    └── Global
        └── UsePaymentDiscount
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that the procedure is grouped by its visibility. This is useful when trying to distinguish an externally accessible declaration from a local implementation detail. The navigator is structural; it does not determine every possible caller or prove how the procedure behaves at runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Navigate from declaration to source
&lt;/h2&gt;

&lt;p&gt;Select &lt;code&gt;UsePaymentDiscount&lt;/code&gt; in the tree. The navigator opens the corresponding AL source and highlights the declaration. This connects the structural information (where the member sits inside its object) to the actual source coordinates (where the implementation or declaration can be read).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkviykzbb82wnqegey77u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkviykzbb82wnqegey77u.png" alt="Selecting an AL declaration highlights its corresponding location in the source editor" width="799" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This example screenshot highlights an OnValidate trigger rather than the Payment Terms procedure. Both illustrate the same principle: select the relevant structure node, inspect its source location and then read the surrounding code for context.&lt;/p&gt;

&lt;p&gt;For another object, the same approach can be applied to a page action, a report data item or an integration event. The useful starting point is the declaration category most relevant to the question you are investigating.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Understand the boundary of the analysis
&lt;/h2&gt;

&lt;p&gt;There are several important distinctions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A package that contains only symbols may not contain the source needed for this workflow. Source navigation cannot reconstruct undistributed AL source.&lt;/li&gt;
&lt;li&gt;Conditional compilation can change which declarations are available to a parser. Compare the active configuration with the one used for the original build when necessary.&lt;/li&gt;
&lt;li&gt;An object tree is not a dependency graph or a runtime call graph. Cross-package resolution and execution are different activities.&lt;/li&gt;
&lt;li&gt;Keep track of the package version, and inspect only source you are authorized to access.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For reproducibility, the illustrated workflow uses desktop VS Code on Windows x64, .NET 8 and a separately installed compatible Microsoft AL backend. The extension's &lt;a href="https://marketplace.visualstudio.com/items?itemName=SANBusinessSolutions.al-structure-explorer" rel="noopener noreferrer"&gt;technical documentation&lt;/a&gt; describes the backend requirements and source limitations. Package inspection itself is local and does not require a Business Central server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Video walkthrough
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://youtu.be/B2jvfZMpe6g" rel="noopener noreferrer"&gt;YouTube demonstration&lt;/a&gt; shows the Payment Terms navigation example and other declaration types in context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Starting with the package identity, then locating an object and finally following a declaration to its source is a practical way to narrow an AL investigation. It is especially helpful when exploring unfamiliar packages or reviewing what is available in a dependency.&lt;/p&gt;

&lt;p&gt;The screenshots use publicly documented examples from Microsoft Base Application. Microsoft and the respective product names retain their ownership; the images do not imply Microsoft endorsement.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I am the developer of the tool shown in the examples. This article was generated with AI assistance from my existing technical materials.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>businesscentral</category>
      <category>vscode</category>
      <category>microsoft</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
