Erik's ToolBox Documentation
Index

Inspectors

The Object Inspector includes a set of dedicated inspector pages, each designed to show detailed metadata for a specific type of Business Central object. When you select an object in the main Object Inspector list and drill down, the toolbox opens the appropriate inspector for that object type.

This page documents each inspector type, what information it displays, and how you can use it in your day-to-day work with Business Central.


Table Inspector

The Table Inspector displays detailed metadata for a selected table object. It reads from the symbol metadata tables to present the full structure of the table.

Table Properties

When you open the Table Inspector for a table, you see the following high-level properties:

Property Description
Table ID The unique numeric identifier for the table
Table Name The name of the table as defined in its AL source
Caption The user-facing caption for the table, which may differ from the internal name
Extension The extension (app) that defines or extends this table

Field List

Below the table properties, the Table Inspector shows a complete list of all fields in the table. For each field, you can see:

Column Description
Field ID The numeric identifier of the field
Field Name The internal name of the field
Data Type The AL data type (Text, Code, Integer, Decimal, Boolean, Date, Time, DateTime, Option, Enum, BLOB, GUID, and others)
Length The maximum length for Text and Code fields
Class The field class: Normal, FlowField, or FlowFilter

Field Details

When you select a field in the list and drill down, you can access additional detail including:

  • Captions -- The user-facing caption for the field, which may be different from the field name and can include translations.
  • Option Values -- For Option and Enum fields, the list of available option values and their numeric indices.
  • Table Relations -- Relationships defined on the field that link it to other tables. This shows you which table and field the relation points to.
  • CalcFormula -- For FlowField fields, the calculation formula that defines how the field value is computed from related data.

From the Table Inspector, you can navigate to:

  • Field Inspector -- Open the dedicated Field Inspector for a selected field to see its complete properties.
  • Data Inspector -- Open the Data Inspector to view and edit the actual data stored in this table.

This navigation flow lets you move from understanding a table's structure to inspecting its data without returning to the main Object Inspector.


Field Inspector

The Field Inspector provides a deep dive into a single field's properties. While the Table Inspector shows a summary of all fields, the Field Inspector gives you every available detail about one specific field.

Field Properties

The Field Inspector displays the following information:

Property Description
Field ID The numeric identifier of the field
Field Name The internal name of the field
Data Type The full data type specification
Length Maximum length (for Text and Code types)
Class Normal, FlowField, or FlowFilter

Option String Values

For fields with an Option or Enum data type, the Field Inspector shows the complete option string. This lists every possible value the field can hold, in the order they are defined. For example, a Status field might show:

" ,Open,Released,Finished"

This tells you that the field has four possible values: a blank value (index 0), "Open" (index 1), "Released" (index 2), and "Finished" (index 3). Knowing the exact option values and their indices is essential when writing AL scripts that set or compare option fields.

Table Relations

The Field Inspector shows all table relations defined on the field. A table relation specifies that the value in this field must correspond to a value in another table. The inspector shows:

  • The related table name and ID.
  • The related field name and ID.
  • Any conditions or filters on the relation.

Understanding table relations helps you trace data dependencies across the Business Central data model.

CalcFormula for FlowFields

If the field is a FlowField (Class = FlowField), the Field Inspector displays the CalcFormula. The CalcFormula defines how the field's value is calculated at runtime from related table data. Common CalcFormula types include:

  • Sum -- Totals a numeric field across filtered records.
  • Count -- Counts the number of matching records.
  • Exist -- Returns true if at least one matching record exists.
  • Lookup -- Retrieves a value from a related record.
  • Average, Min, Max -- Aggregate functions over filtered records.

Viewing the CalcFormula is valuable when you need to understand where a computed value comes from, or when you are debugging discrepancies between displayed values and the underlying data.


Page Inspector

The Page Inspector displays metadata for a selected page object. It helps you understand the structure and behavior of any page in the system.

Page Properties

The Page Inspector shows the following high-level properties:

Property Description
Page ID The unique numeric identifier for the page
Page Name The name of the page as defined in its AL source
Page Type The type of page (Card, List, ListPart, Worksheet, Document, NavigatePage, and others)
Source Table The table that provides data to this page (if applicable)

The Source Table property is particularly useful because it tells you which table a page reads from and writes to. If you need to find the underlying table for a page, this property gives you the answer immediately.

Page Controls Inspector

The Page Controls Inspector sub-page lists all controls defined on the page. Controls include fields, groups, parts, and other UI elements. For each control, you can see:

Column Description
Control Name The name of the control
Control Type The type of control (Field, Group, Part, Repeater, and others)
Source Expression The field or expression that the control is bound to
Properties Additional properties defined on the control

The Page Controls Inspector is useful when you need to understand which fields are displayed on a page, how they are organized into groups, and what source expressions drive each control. This information is valuable when building scripts that interact with page data, or when troubleshooting UI issues.

Page Actions Inspector

The Page Actions Inspector sub-page lists all actions defined on the page. Actions are the buttons and menu items that users can click to perform operations. For each action, you can see:

Column Description
Action Name The name of the action
Action Type The type of action (Action, Group, Separator, and others)
Caption The user-facing label for the action
Promoted Whether the action is promoted to the action bar

Understanding page actions helps you know what operations are available on a page and how the page is designed to be used.


Report Inspector

The Report Inspector displays metadata for a selected report object. It helps you understand how reports are structured and what data they consume.

Report Properties

The Report Inspector shows the following high-level properties:

Property Description
Report ID The unique numeric identifier for the report
Report Name The name of the report as defined in its AL source

Report Data Items

The Report Data Items sub-page shows the data items defined in the report. Data items represent the tables that the report reads from, and they define the data flow through the report. For each data item, you can see:

Column Description
Data Item Name The name assigned to the data item
Source Table The table that provides data to this data item
Data Item Link The relationship between this data item and its parent data item
Keys The sorting key used for this data item

Data items are hierarchical. A report can have a top-level data item and one or more nested data items beneath it. The Data Item Link defines how a child data item relates to its parent. For example, a Sales Header data item might have a nested Sales Line data item linked by the Document No. field.

Understanding the data item structure is important when:

  • You need to know which tables a report reads from.
  • You are debugging report output and need to trace where data comes from.
  • You are building AL scripts that replicate or supplement report logic.

Codeunit Inspector

The Codeunit Inspector displays metadata for a selected codeunit object. Codeunits are the primary containers for business logic in Business Central, and the inspector helps you understand what methods a codeunit exposes.

Codeunit Properties

The Codeunit Inspector shows the following high-level properties:

Property Description
Codeunit ID The unique numeric identifier for the codeunit
Codeunit Name The name of the codeunit as defined in its AL source

Method List

The Codeunit Inspector lists all public methods (procedures and triggers) defined in the codeunit. For each method, you can see:

Column Description
Method Name The name of the method
Parameters The list of parameters with their names and types
Return Type The return type of the method (if it returns a value)

This information is extracted from the symbol metadata and reflects the public interface of the codeunit. Private methods and local variables are not included in the symbol data and therefore do not appear in the inspector.

Using Codeunit Inspector Data

The method signatures shown in the Codeunit Inspector are useful when:

  • You are writing AL scripts and need to call a codeunit method with the correct parameters.
  • You are exploring unfamiliar extensions and need to understand what functionality a codeunit provides.
  • You are documenting the public API of a codeunit for your team.

General Tips for Working with Inspectors

Finding Exact Object Names for AL Scripts

When you write AL code in the ToolBox interactive editor, you need exact object names for variable declarations and method calls. The inspectors provide these exact names. For example, if you need to declare a record variable for a table, the Table Inspector shows you the precise table name to use in your Record variable declaration.

Cross-Referencing Between Inspectors

The inspectors work together to give you a complete picture of how objects relate to each other. A common workflow is:

  1. Start with a table in the Table Inspector to understand the data model.
  2. Check the fields to find specific field names and data types.
  3. Navigate to the Page Inspector to find pages that use this table as their source.
  4. Review the Page Controls Inspector to see which fields are displayed on the page.
  5. Open the Report Inspector to find reports that include this table as a data item.

This cross-referencing approach is especially valuable when investigating how a particular piece of data flows through the system from table storage to user interface to printed reports.

Exporting Inspector Data

You can use the data displayed in the inspectors as a reference when creating documentation, building specifications, or communicating with your development team. The structured format of the inspector output makes it straightforward to copy field lists, method signatures, and object properties into your documentation.


Inspector Summary

The following table summarizes all inspector pages and their purpose:

Inspector Type Purpose
Object Inspector Page Main object browser and entry point
Field Inspector Page Detailed field properties
Data Inspector Page View and edit table data
Page Inspector Page Page properties, controls, and actions
Table Inspector Page Table properties and field list
Report Inspector Page Report properties and data items
Codeunit Inspector Codeunit Codeunit properties and methods
Inspector Management Codeunit Navigation and data coordination
Page Controls Inspector Sub-page Controls on a page
Page Actions Inspector Sub-page Actions on a page
Report Data Items Sub-page Data items in a report

Tips and Best Practices

  • Use the Table Inspector as your starting point. Tables are the foundation of the Business Central data model. Understanding a table's fields and relationships gives you context for everything else.
  • Check FlowField CalcFormulas when values seem wrong. If a computed value does not match what you expect, the Field Inspector shows you the exact CalcFormula so you can trace the calculation.
  • Review page controls to understand the user experience. The Page Controls Inspector reveals which fields are on a page and how they are organized, which is useful for training, documentation, and troubleshooting.
  • Look at report data items before building custom reports. Understanding how existing reports are structured can save you time when creating new reports or modifying existing ones.
  • Use codeunit method signatures for accurate script writing. When calling codeunit methods from your ToolBox scripts, the Codeunit Inspector ensures you use the correct parameter types and order.