---
id: object/codeunit/5821
type: object
title: Codeunit 5821 "Cost Adjustment Subscribers"
summary: Codeunit 5821 "Cost Adjustment Subscribers" in Base Application (Microsoft.Inventory.Costing). 1 public procedures, 1 events, 25 event subscribers. Introduced in BC24, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: "24"
  last_changed: "26"
  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: cced956870af14b77befe0da1ed0fff9a6f87853ea68a15d25298ef27371b922
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Costing/CostAdjustmentSubscribers.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Costing/CostAdjustmentSubscribers.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: 5821
name: Cost Adjustment Subscribers
namespace: Microsoft.Inventory.Costing
app: Base Application
extends: null
first_version: "24"
last_version: "30"
present_in:
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 31
  events: 1
  subscribers: 25
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 1
  called_by: 0
  implements: 0
---

# Codeunit 5821 "Cost Adjustment Subscribers"

> Codeunit 5821 "Cost Adjustment Subscribers" in Base Application (Microsoft.Inventory.Costing). 1 public procedures, 1 events, 25 event subscribers. Introduced in BC24, still in BC30, changed in BC26.

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

## Properties

| Property | Value |
|---|---|
| Permissions | tabledata "Cost Adjustment Log" = rimd, tabledata "Cost Adjustment Detailed Log" = rimd, tabledata "Item Register" = r, tabledata "Cost Adjustment Trace Log" = rimd |

## Events published

- `OnCostAdjustmentDetailLogCreated(var CostAdjustmentDetailedLog: Record "Cost Adjustment Detailed Log")` (internal)
  - subscribers: [Codeunit 5842 "Cost Adjmt. Signals"](../codeunit/5842.md) RaiseSignalOnCostAdjustmentDurationExceeded

## Event subscriptions

- InitializeBucketRunCostAdjustment subscribes to Codeunit "Cost Adjustment Runner" OnBeforeRunCostAdjustment
- InitializeRegularCostAdjustment subscribes to Report "Adjust Cost - Item Entries" OnBeforeRunCostAdjustment
- LogLastBucketRun subscribes to Codeunit "Cost Adjustment Runner" OnAfterRunCostAdjustment
- LogLastOrdinaryRun subscribes to Report "Adjust Cost - Item Entries" OnAfterRunCostAdjustment
- RegisterSuccessBucketRun subscribes to Codeunit "Cost Adjustment Runner" OnRegisterSuccess
- RegisterFailureBucketRun subscribes to Codeunit "Cost Adjustment Runner" OnRegisterFailure
- RegisterSuccessRegularRun subscribes to Report "Adjust Cost - Item Entries" OnRegisterSuccess
- RegisterFailureRegularRun subscribes to Report "Adjust Cost - Item Entries" OnRegisterFailure
- AddGuidToItemRegister subscribes to Codeunit "Item Jnl.-Post Line" OnInsertItemRegOnBeforeItemRegInsert
- PushItemBeforeAdjustment subscribes to Codeunit "Inventory Adjustment" OnBeforeAdjustItem
- PopItemAfterAdjustment subscribes to Codeunit "Inventory Adjustment" OnAfterAdjustItem
- OnBeforePostItemJnlLine subscribes to Codeunit "Inventory Adjustment" OnBeforePostItemJnlLine
- OnAdjustItemAppliedCostForItemLedgerEntry subscribes to Codeunit "Inventory Adjustment" OnAdjustItemAppliedCostForItemLedgerEntry
- OnEliminateRndgResidualOnBeforeCheckHasNewCost subscribes to Codeunit "Inventory Adjustment" OnEliminateRndgResidualOnBeforeCheckHasNewCost
- OnAdjustAppliedOutbndEntry subscribes to Codeunit "Inventory Adjustment" OnAdjustAppliedOutbndEntry
- OnBeforeUpdateAdjmtBuf subscribes to Codeunit "Inventory Adjustment" OnBeforeUpdateAdjmtBuf
- OnAdjustAppliedInbndTransEntry subscribes to Codeunit "Inventory Adjustment" OnAdjustAppliedInbndTransEntry
- OnAdjustAppliedInbndEntry subscribes to Codeunit "Inventory Adjustment" OnAdjustAppliedInbndEntry
- OnBeforeAvgCostAdjmtEntryPoint subscribes to Codeunit "Inventory Adjustment" OnBeforeAvgCostAdjmtEntryPoint
- OnAdjustOutbndAvgEntry subscribes to Codeunit "Inventory Adjustment" OnAdjustOutbndAvgEntry
- OnBeforeIteratingOverOutbndAvgEntries subscribes to Codeunit "Inventory Adjustment" OnBeforeIteratingOverOutbndAvgEntries
- OnMakeAssemblyAdjmt subscribes to Codeunit "Inventory Adjustment" OnMakeAssemblyAdjmt
- OnMakeWIPAdjmt subscribes to Codeunit "Inventory Adjustment" OnMakeWIPAdjmt
- OnBeforeIsExcludeFromAvgCostForRevalPoint subscribes to Codeunit "Inventory Adjustment" OnBeforeIsExcludeFromAvgCostForRevalPoint
- OnAdjustOutbndAvgEntryOnBeforeForwardAvgCostToInbndEntries subscribes to Codeunit "Inventory Adjustment" OnAdjustOutbndAvgEntryOnBeforeForwardAvgCostToInbndEntries

## Procedures

- `FlushTraceLog()` (internal)

Plus 4 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 8703 "Feature Telemetry"](../codeunit/8703.md) (3 calls: `FlushTraceLog → LogUsage`, `RegisterFailureBucketRun → LogUsage`, `RegisterSuccessBucketRun → LogUsage`)

## Across versions

- Present in: BC24-30
- Changed (declaration) in: BC26

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: "Cost Adjustment Subscribers")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
