---
id: object/codeunit/3675
type: object
title: Codeunit 3675 "BOM Tree Node Dictionary"
summary: Codeunit 3675 "BOM Tree Node Dictionary" in Base Application (Microsoft.Inventory.BOM.Tree). 10 public procedures. Present since at least BC23, still in BC30, changed in BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 2d2c894eb7ee46bf0cbd0b3afc1f29dd64bdc2fe980fcee61d0a90be4e5e8824
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/BOM/Tree/BOMTreeNodeDictionary.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/BOM/Tree/BOMTreeNodeDictionary.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9531
object_type: codeunit
object_id: 3675
name: BOM Tree Node Dictionary
namespace: Microsoft.Inventory.BOM.Tree
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 10
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 2
  implements: 0
---

# Codeunit 3675 "BOM Tree Node Dictionary"

> Codeunit 3675 "BOM Tree Node Dictionary" in Base Application (Microsoft.Inventory.BOM.Tree). 10 public procedures. Present since at least BC23, still in BC30, changed in BC28.

Base Application · Microsoft.Inventory.BOM.Tree · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/BOM/Tree/BOMTreeNodeDictionary.Codeunit.al) · facts from BC29

## Procedures

- `Add(Instance: Codeunit "BOM Tree Node")` (internal): Adds an instance to the dictionary. The key is fetched from the GetKey() procedure of the Instance implementation. The instance to add. In case there is another instance with a key same as the one being added, an error shall be raised.
- `TryAdd(Instance: Codeunit "BOM Tree Node")` (internal): Adds an instance to the dictionary by calling the Add() procedure in a TryFunction. The instance to add.
- `Get(InstanceKey: Text; var Found: Codeunit "BOM Tree Node")` (internal): Fetches the instance based on the given key. The key given. The instance that was fetched.
- `TryGet(UniqueKey: Text; var Found: Codeunit "BOM Tree Node")` (internal): Fetches the instance based on the given key by calling the Get() procedure in a TryFunction. The key given. The instance that was fetched.
- `ContainsKey(InstanceKey: Text): Boolean` (internal): Checks whether an instance with the given key exists in the dictionary without raising an error. The key given.
- `Remove(InstanceKey: Text)`: Removes the instance from the dictionary that correponds to the given key. The given key.
- `ResetEnumerator()`: Resets the internal variables that allow iterating through the items in the dictionary. It is a good practice to call this before starting an iteration.
- `MoveNext(): Boolean`: Advances the enumerator to the next element of the dictionary.
- `GetCurrent(var Instance: Codeunit "BOM Tree Node")` (internal): Gets the element in the dictionary at the current position of the enumerator. The instance pointed at.
- `Count(): Integer`: Gets the number of items in the dictionary.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3676 "BOM Tree Node Dictionary Impl."](../codeunit/3676.md) (10 calls: `Add → Add`, `ContainsKey → Contains`, `Count → Count`, …)

## Called by

- [Codeunit 3683 "BOM Tree Impl."](../codeunit/3683.md) (6 calls: `AddRelation → Add`, `AddRelation → TryGet`, `ChildHasKey → TryGet`, …)
- [Codeunit 3684 "BOM Tree Node"](../codeunit/3684.md) (5 calls: `AddChild → Add`, `IsChild → ContainsKey`, `TraverseChildren → GetCurrent`, …)

## Recent changes

- 2026-07-17 [#9531 [Master]- Report 152 "Calculate Low Level Code" terminates with error: "Cannot add instance as another with key %1 has already been added." after upgrade to v28.1](../../changes/bcapps/9531.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "BOM Tree Node Dictionary")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
