---
title: "Table 5820 Cost Element Buffer"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/table/5820-cost-element-buffer/
type: table
id: 5820
name: "Cost Element Buffer"
app: "Base Application"
namespace: Microsoft.Inventory.Costing
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/table/5820-cost-element-buffer/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Table 5820 Cost Element Buffer

Jonas Paprotka, https://jonas-paprotka.de/ref/table/5820-cost-element-buffer/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Inventory.Costing |
| Versions | 17-28 |
| Source file | Inventory/Costing/CostElementBuffer.Table.al |

## Fields

| Id | Name | Type | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| 1 | Type | Enum Cost Entry Type | 17-28 | - | - |
| 2 | Variance Type | Enum Cost Variance Type | 17-28 | - | - |
| 3 | Actual Cost | Decimal | 17-28 | - | - |
| 4 | Actual Cost (ACY) | Decimal | 17-28 | - | - |
| 5 | Rounding Residual | Decimal | 17-28 | - | - |
| 6 | Rounding Residual (ACY) | Decimal | 17-28 | - | - |
| 7 | Expected Cost | Decimal | 17-28 | - | - |
| 8 | Expected Cost (ACY) | Decimal | 17-28 | - | - |
| 9 | Invoiced Quantity | Decimal | 17-28 | - | - |
| 10 | Remaining Quantity | Decimal | 17-28 | - | - |
| 11 | Inbound Completely Invoiced | Boolean | 17-28 | - | - |
| 12 | Last Valid Value Entry No | Integer | 17-28 | - | - |

## Keys

| Name | Fields | Versions |
| --- | --- | --- |
| Key1, clustered | Type, Variance Type | 17-28 |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| Initialize | (Boolean) | - | public | 17-28 | - | - |
| AddActualCost | (Option, Option, Decimal, Decimal) | - | public | 17-26 | Pending 24.0 | Unused |
| AddActualCostElement | (Enum Cost Entry Type, Enum Cost Variance Type, Decimal, Decimal) | - | public | 17-26 | Pending 24.0 | Use AddActualCostElement(NewEntryType: Enum "Cost Entry Type"; NewActualCost: Decimal; NewActualCostACY: Decimal) instead. |
| AddExpectedCost | (Option, Option, Decimal, Decimal) | - | public | 17-19 | Pending 17.0 | Replaced by AddExpectedCostElement(); |
| AddExpectedCostElement | (Enum Cost Entry Type, Enum Cost Variance Type, Decimal, Decimal) | - | public | 17-26 | Pending 24.0 | Use AddExpectedCostElement(NewEntryType: Enum "Cost Entry Type"; NewActualCost: Decimal; NewActualCostACY: Decimal) instead. |
| RoundActualCost | (Decimal, Decimal, Decimal) | - | public | 17-28 | - | - |
| ExcludeEntryFromAvgCostCalc | (Record Value Entry) | - | public | 17-28 | - | - |
| ExcludeBufFromAvgCostCalc | (Record Inventory Adjustment Buffer) | - | public | 17-28 | - | - |
| Retrieve | (Option, Option) | Boolean | public | 17-19 | Pending 17.0 | Replaced by GetElement(). |
| GetElement | (Enum Cost Entry Type, Enum Cost Variance Type) | Boolean | public | 17-26 | Pending 24.0 | Use GetElement(NewEntryType: Enum "Cost Entry Type") instead. |
| DeductOutbndValueEntryFromBuf | (Record Value Entry, Record Cost Element Buffer, Boolean) | - | public | 17-28 | - | - |
| UpdateAvgCostBuffer | (Record Cost Element Buffer, Integer) | - | public | 17-28 | - | - |
| UpdateCostElementBuffer | (Record Cost Element Buffer) | - | public | 17-28 | - | - |
| AddActualCostElement | (Enum Cost Entry Type, Decimal, Decimal) | - | public | 24-28 | - | - |
| AddActualCostElement | (Enum Cost Entry Type, Record Value Entry) | - | public | 24-28 | - | - |
| AddExpectedCostElement | (Enum Cost Entry Type, Decimal, Decimal) | - | public | 24-28 | - | - |
| AddExpectedCostElement | (Enum Cost Entry Type, Record Value Entry) | - | public | 24-28 | - | - |
| GetElement | (Enum Cost Entry Type) | Boolean | public | 24-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterUpdateAvgCostBuffer | (var Record Cost Element Buffer, Record Cost Element Buffer, Integer) | 22-28 | - | - |
| Integration event | OnAfterUpdateCostElementBuffer | (var Record Cost Element Buffer, Record Cost Element Buffer) | 22-28 | - | - |
| Integration event | OnAfterExcludeBufFromAvgCostCalc | (var Record Cost Element Buffer, Record Inventory Adjustment Buffer) | 22-28 | - | - |
| Integration event | OnAfterRoundActualCost | (var Record Cost Element Buffer, Decimal, Decimal, Decimal) | 22-28 | - | - |
| Integration event | OnAfterDeductOutbndValueEntryFromBuf | (var Record Cost Element Buffer, Record Value Entry, Record Cost Element Buffer, Boolean) | 22-28 | - | - |
| Integration event | OnAfterExcludeEntryFromAvgCostCalc | (var Record Cost Element Buffer, Record Value Entry) | 22-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
