---
id: object/codeunit/9666
type: object
title: Codeunit 9666 "Company Metadata Builder"
summary: Codeunit 9666 "Company Metadata Builder" in Base Application (Microsoft.Foundation.Reporting). 30 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: "29"
  last_changed: null
  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: 3966ee0c57334645bbb61e9694e398143a7c1314c22bd9029c74735a61227d89
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Reporting/CompanyMetadataBuilder.Codeunit.al
    title: src/Layers/W1/BaseApp/Foundation/Reporting/CompanyMetadataBuilder.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/9094
object_type: codeunit
object_id: 9666
name: Company Metadata Builder
namespace: Microsoft.Foundation.Reporting
app: Base Application
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 31
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 1
  implements: 0
---

# Codeunit 9666 "Company Metadata Builder"

> Codeunit 9666 "Company Metadata Builder" in Base Application (Microsoft.Foundation.Reporting). 30 public procedures. Introduced in BC29, still in BC30.

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

## Properties

| Property | Value |
|---|---|
| Access | Internal |

## Procedures

- `SetName(Value: Text)`
- `SetDisplayName(Value: Text)`
- `AddAddressLine(Value: Text)`
- `SetPhone(Value: Text)`
- `SetPhoneCaption(Value: Text)`
- `SetFaxNo(Value: Text)`
- `SetFaxNoCaption(Value: Text)`
- `SetEmail(Value: Text)`
- `SetEmailCaption(Value: Text)`
- `SetHomePage(Value: Text)`
- `SetHomePageCaption(Value: Text)`
- `SetLogo(Base64Value: Text)`
- `SetVATRegistrationNo(Value: Text)`
- `SetVATRegistrationNoCaption(Value: Text)`
- `SetRegistrationNo(Value: Text)`
- `SetRegistrationNoCaption(Value: Text)`
- `SetBankName(Value: Text)`
- `SetBankNameCaption(Value: Text)`
- `SetBankAccountNo(Value: Text)`
- `SetBankAccountNoCaption(Value: Text)`
- `SetBankBranchNo(Value: Text)`
- `SetBankBranchNoCaption(Value: Text)`
- `SetIBAN(Value: Text)`
- `SetIBANCaption(Value: Text)`
- `SetBankSWIFT(Value: Text)`
- `SetBankSWIFTCaption(Value: Text)`
- `SetGiroNo(Value: Text)`
- `SetGiroNoCaption(Value: Text)`
- `PopulateFromCompanyInformation(var CompanyInfo: Record "Company Information")`: Populates the company block from a Company Information record: name, the formatted address (via the country/region address format), and the phone/fax/email/home page, VAT/registration, bank, and giro fields with their captions. Display name and logo are set separately by the caller because they are ...
- `WriteTo(var CompanyMetadata: JsonObject)`: Merges the built payload (including the address-line repeater) into the JsonObject the platform passed to the subscriber. Modifies the passed object in place.

Plus 1 local procedures.

## 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 365 "Format Address"](../codeunit/365.md) (1 call: `PopulateFromCompanyInformation → Company`)

## Called by

- [Codeunit 44 "ReportManagement"](../codeunit/44.md) (4 calls: `GetCompanyMetadata → PopulateFromCompanyInformation`, `GetCompanyMetadata → SetDisplayName`, `GetCompanyMetadata → SetLogo`, …)

## Recent changes

- 2026-08-03 [#9094 Add shared CompanyMetadata data source for report layouts](../../changes/bcapps/9094.md) (main, BC30, feature, added)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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: "Company Metadata Builder")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
