---
title: "Codeunit 5822 Cost Adjustment Bucket Runner, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/points/
object: https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 5822 Cost Adjustment Bucket Runner, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/points/

3 procedures and triggers with a step in src/Layers/W1/BaseApp/Inventory/Costing/CostAdjustmentBucketRunner.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 16](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L16), trigger.

- [24](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L24) calls `LockTables`
- [28](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L28) calls [Codeunit 5894 Inventory Adjustment Handler](https://jonas-paprotka.de/ref/codeunit/5894-inventory-adjustment-handler/) `SetFilterItem`
- [29](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L29) calls `SetCostAdjustmentParameters`
- [30](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L30) calls [Codeunit 5894 Inventory Adjustment Handler](https://jonas-paprotka.de/ref/codeunit/5894-inventory-adjustment-handler/) `MakeInventoryAdjustment`
- [33](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L33) calls [Codeunit 410 Update Analysis View](https://jonas-paprotka.de/ref/codeunit/410-update-analysis-view/) `UpdateAll`
- [34](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L34) calls [Codeunit 7150 Update Item Analysis View](https://jonas-paprotka.de/ref/codeunit/7150-update-item-analysis-view/) `UpdateAll`

## LockTables

[Line 37](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L37), local.

- [45](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L45) calls [Table 339 Item Application Entry](https://jonas-paprotka.de/ref/table/339-item-application-entry/) `GetLastEntryNo`
- [49](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L49) calls [Table 32 Item Ledger Entry](https://jonas-paprotka.de/ref/table/32-item-ledger-entry/) `GetLastEntryNo`
- [53](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L53) calls [Table 5802 Value Entry](https://jonas-paprotka.de/ref/table/5802-value-entry/) `GetLastEntryNo`
- [56](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L56) calls [Codeunit 5849 Avg. Cost Entry Point Handler](https://jonas-paprotka.de/ref/codeunit/5849-avg-cost-entry-point-handler/) `LockBuffer`

## SetCostAdjustmentParameters

[Line 61](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L61), local.

- [71](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L71) raises `OnAfterSetCostAdjustmentParameter`
- [73](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L73) calls [Codeunit 5824 Cost Adjustment Params Mgt.](https://jonas-paprotka.de/ref/codeunit/5824-cost-adjustment-params-mgt/) `SetParameters`
- [74](https://jonas-paprotka.de/ref/codeunit/5822-cost-adjustment-bucket-runner/source/#L74) raises `OnAfterSetCostAdjustmentParameterOnAfterSetParameters`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
