---
id: object/codeunit/3111
type: object
title: Codeunit 3111 "Activity Log Builder"
summary: Codeunit 3111 "Activity Log Builder" in System Application (System.Log). 9 public procedures. Introduced in BC26, still in BC30, changed in BC27-28.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: "26"
  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: ae23df6831dbc8ef9cf1bc08048add7042ace429aa1a47ca48ae422a2cc0c816
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/ActivityLog/src/ActivityLogBuilder.Codeunit.al
    title: src/System Application/App/ActivityLog/src/ActivityLogBuilder.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 3111
name: Activity Log Builder
namespace: System.Log
app: System Application
extends: null
first_version: "26"
last_version: "30"
present_in:
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 9
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 0
  implements: 0
---

# Codeunit 3111 "Activity Log Builder"

> Codeunit 3111 "Activity Log Builder" in System Application (System.Log). 9 public procedures. Introduced in BC26, still in BC30, changed in BC27-28.

System Application · System.Log · BC26-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/ActivityLog/src/ActivityLogBuilder.Codeunit.al) · facts from BC29

## Procedures

- `Init(TableNo: Integer; FieldNo: Integer; RecSystemId: Guid): Codeunit "Activity Log Builder"`: Initializes the activity log builder for a specific table and field.
- `SetExplanation(Explanation: Text): Codeunit "Activity Log Builder"`: Sets the explanation for the activity log entry.
- `SetType(Type: Enum "Activity Log Type"): Codeunit "Activity Log Builder"`: Sets the type of the activity log entry. Allowed values are "AI" for AI-related activities and "AL" for general activities
- `SetConfidence(Confidence: Text): Codeunit "Activity Log Builder"`: Sets the confidence level for the activity log value.
- `SetReferenceSource(PageId: Integer; var Rec: RecordRef): Codeunit "Activity Log Builder"`: Sets the reference source for the activity log entry. The reference source can be a page ID and a record reference, which will be converted to a URL.
- `SetReferenceSource(ReferenceSource: Text): Codeunit "Activity Log Builder"`: Sets the reference source for the activity log entry. This can be a URL or any other text that identifies the source of the reference.
- `SetReferenceTitle(ReferenceTitle: Text): Codeunit "Activity Log Builder"`: Sets the reference title for the activity log entry.
- `Log()`: Logs the activity entry that has been built using the methods of this codeunit.
- `Query(TableNo: Integer; RecSystemId: Guid): Text`: Retrieves the activity log entries for the specified table and system identifier as a JSON string.

## 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 3112 "Activity Log Builder Impl."](../codeunit/3112.md) (8 calls: `Init → Init`, `Log → Log`, `Query → Query`, …)

## Across versions

- Present in: BC26-30
- Changed (declaration) in: BC27-28

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