---
title: "Codeunit 1104 Cost Account Allocation"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/1104-cost-account-allocation/
type: codeunit
id: 1104
name: "Cost Account Allocation"
app: "Base Application"
namespace: Microsoft.CostAccounting.Allocation
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/1104-cost-account-allocation/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 1104 Cost Account Allocation

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/1104-cost-account-allocation/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.CostAccounting.Allocation |
| Versions | 17-28 |
| Source file | CostAccounting/Allocation/CostAccountAllocation.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CalcAllocationKeys | () | Integer | public | 17-28 | - | - |
| CalcAllocationKey | (var Record Cost Allocation Source) | - | public | 17-28 | - | - |
| CalcLineShare | (var Record Cost Allocation Target) | - | public | 17-28 | - | - |
| GetTotalShare | (var Decimal) | - | public | 17-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnBeforeCalcDateFilter | (Record Cost Allocation Target, var Date, var Date, var Boolean) | 17-20 | - | - |
| Integration event | OnBeforeCalcLineShare | (Record Cost Allocation Target, var Boolean) | 17-20 | - | - |
| Integration event | OnAfterCalcAllocationKey | (var Record Cost Allocation Source) | 19-28 | - | - |
| Integration event | OnBeforeCalcAllocationKey | (var Record Cost Allocation Source) | 19-28 | - | - |
| Integration event | OnBeforeCalcDateFilter | (var Record Cost Allocation Target, var Date, var Date, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeCalcLineShare | (var Record Cost Allocation Target, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeCalcEmployeeCountShare | (Record Cost Allocation Target, var Decimal, Date, Date, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeCalcItemSoldQtyShare | (var Record Cost Allocation Target, var Record Value Entry, var Boolean) | 26-28 | - | - |
| Integration event | OnAfterSumValueEntryField | (var Record Value Entry, Integer) | 26-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.
