Multi-Entity Allocation & Recharge Journal
Automate intercompany cost recharges with configurable allocation keys (headcount, %, revenue, sqm).
- Current version: v0.1.1.1
- AL prefix: MULTI
- Object range: 80700-80799
- Business Central: 26.0.0.0
- Publisher: Amplio Solutions
Multi-Entity Allocation & Recharge Journal Tool
Business Central AL extension that automates intercompany cost recharges using configurable allocation keys (headcount, percentage, revenue, sqm). Source GL balances are summed for a chosen period and dimension filter, split by an allocation key, and posted into the standard ICP General Journal in each target company.
| Publisher | Amplio Solutions |
| Version | 0.1.1.0 |
| Target | BC application 26.0.0.0 / platform 26.0.0.0 |
| Country | GB |
| Object range | 80700..80799 |
| Prefix | AMP |
What's complete in this MVP (v0.1.0.0)
Data model
AMP Allocation Setup(80700) — singleton: ICP journal template/batch, source clearing account, run-no. series.AMP Allocation Key Header(80701) — keys with effective-from/to, key type, source company + source GL account.AMP Allocation Key Line(80702) — target company, IC partner, target GL account, target dim 1/2, weight.AMP Allocation Source Filter(80703) — extra GL account / dim 1 / dim 2 filters per key. Multiple filters on a key are OR'd together.AMP Allocation Run History(80704) — one row per run, with status, totals, audit fields, error.AMP Allocation Run Buffer(80705) — preview lines (target company, share %, allocated amount, posted flag).
Enums
AMP Allocation Key Type(80700) —Percentage,Headcount,Revenue,Floor Area (sqm).AMP Allocation Run Status(80701) —Draft,Previewed,Posted,Cancelled,Error.
Codeunits
AMP Allocation Engine(80700) —CreateRun,CalculatePreview,PostRun,CancelRun. Source amount usesChangeCompanyagainstG/L Entryso the source company can differ from the company you run the engine in. Final preview line absorbs the rounding remainder so allocated total equals source total exactly.AMP Allocation ICP Posting(80701) —PostBuffer. For each preview line, opens the target company viaChangeCompanyonGen. Journal Line, inserts an inbound recharge line on the configured ICP template/batch, and routes it through the standard 2023 wave 2 cross-environment ICP plumbing (IC Partner Code,IC Account Type,IC Account No.,IC Direction = Outgoing). WhenAuto-Reverse on Rechargeis on, posts a single offsetting credit-memo line in the source company against the configured clearing account.AMP Allocation Install(80702) — initialises the setup singleton on install.
Pages
AMP Allocation Setup(80700) — admin card.AMP Allocation Key List(80701) /Card(80702) /Linespart (80703) /Source Filterspart (80704).AMP Allocation Run(80705) — the working surface: select key + period, Create & Preview action, Post action, Cancel Run action, with the preview part bound below.AMP Allocation Run Preview(80706) — preview/posted lines.AMP Allocation Run History(80707) /Card(80708) — one row per run.
Page extensions
AMP G/L Account Card Ext(80700) — adds an "Allocation Keys" navigation action onto the G/L Account Card filtered by the source account.
Permission sets
ASMEAAll(80700, CaptionAmplio MEA All Permissions) — full RIMD over the extension's tables and execute on every object.ASMEARead(80701, CaptionAmplio MEA Read Only) — read-only over the same surface for finance users who only need history visibility.
Configuration
app.json— publisher, version, idRanges, deps on Base Application + System Application + Intercompany at 26.0.0.0; runtime 13.0; cloud target..vscode/launch.json— local Docker sandbox + cloud sandbox..gitignore,.editorconfig— standard AL housekeeping.
How a recharge run flows
- Open Multi-Entity Allocation Setup and pin: ICP journal template + batch, source clearing G/L account, run-no. series.
- Open Allocation Keys, create a key (e.g.
RENT-HCheadcount split). Add target lines: each line names a target company, IC partner, target GL account, optional dimensions, and a weight (e.g. headcount in that company). - From the key, click New Allocation Run → fill period start/end + posting date → Create & Preview. The engine sums G/L entries in the source company for the source account and dimension filters across the period, then walks the key lines applying weight ÷ total-weight × source amount.
- Review the preview part. Click Post to write inbound lines into each target company's ICP general journal via
ChangeCompanyand the cross-environment ICP plumbing. The source-side offset (if enabled) goes to the clearing account in one credit-memo line. - The run record moves to
Postedand is visible in Allocation Run History, with the document no. (ALLOC-<run no.>) preserved for traceability.
What Lee needs to ship this to production
These are deliberately left to the implementer because they depend on the customer's chart of accounts, ICP topology and tenant security model.
- ICP partner setup
- Each target company in the recharge fan-out must exist as an
IC Partnerin the source company, and the IC partner'sInbox Type/Inbox Detailsmust be configured for the cross-environment plumbing (BC 2023 wave 2). ConfirmIC Setuplists every partner and that the inbound batch on the partner side accepts the document type written byAMP Allocation ICP Posting(Invoicefor inbound,Credit Memofor source offset). - The ICP G/L account in each target company should mirror the
Source Clearing Account No.in the source company (or whatever convention you adopt) so the reciprocating IC entry flows back cleanly.
- Each target company in the recharge fan-out must exist as an
- G/L + dimension filter conventions
- Decide whether allocation keys reference a single source GL account (e.g.
6800 IT Services) or a range/filter viaSource Filters(e.g.6100..6199for facilities). The MVP supports both, but the convention should be pinned in your account-setup playbook so a new finance starter doesn't accidentally double-count. - Confirm the global dimensions (
Global Dimension 1 Code,Global Dimension 2 Code) used on source filters match how cost is captured in the source GL — usuallyDEPARTMENTandPROJECT/COSTCENTRE. Lines in the key carry onlyTarget Dimension 1/2 Codebecause the recharge is by definition coming from the recharging company; if you want to preserve a source dimension across companies, add a column toAMP Allocation Key Linein v0.2.
- Decide whether allocation keys reference a single source GL account (e.g.
- Target-company access permissions
- The user account that runs an allocation needs
Indirectpermission onGen. Journal Lineand the ICP tables in every target company in addition to the source company. Without this,ChangeCompanysucceeds but theInserton the target'sGen. Journal Linewill fail. - Assign the supplied
ASMEAAllpermission set (CaptionAmplio MEA All Permissions) to the finance recharge role in the source company; assignASMEARead(CaptionAmplio MEA Read Only, or your standard read-only finance set) in target companies if you want target users to be able to see the history. - On cloud sandbox / production, also grant the relevant Microsoft entitlements (
D365 INTERCOMPANY POSTING,D365 BUS PREMIUMetc.) to the running user.
- The user account that runs an allocation needs
- No-series, journal templates, clearing account
- Create a no. series for
Allocation Run Nos.(suggested:AMPALLOC,AMPALLOC0001+1). - Pre-create a dedicated ICP journal template + batch (suggested:
ICPRECH/DEFAULT) and pin them on the setup card. - Pick (or create) the source-side clearing G/L account. It should be a posting account, unblocked, and dimensioned consistently with how you'll reconcile the recharge each period-end.
- Create a no. series for
- Validation that's deliberately out of scope for v0.1
- Driver-data import (e.g. headcount feed from Dataverse / payroll) — for now, weights are entered by hand on
AMP Allocation Key Lines. - Recursive allocations (one allocation feeding another) — single-source single-target-set only.
- Reversal of a posted run — currently you reverse via the standard journal; an
AMP Reverse Runaction is on the v0.2 list. - FX. Source amount and target lines are posted in the source company's LCY; multi-currency recharges should be modelled with the standard ICP currency setup but have not been end-to-end tested.
- Driver-data import (e.g. headcount feed from Dataverse / payroll) — for now, weights are entered by hand on
v0.2 backlog (deferred)
- Driver-data import (CSV / API for headcount, sqm, revenue).
- Recursive allocation chains (output of one key as input of another).
- Reverse-posted-run action.
- Revenue and Floor Area key types end-to-end (data model is ready; engine treats them identically to
Percentagefor now). - Per-company FX revaluation on the source-side offset.
Folder layout
13-Multi-Entity-Allocation/
├── app.json
├── .vscode/launch.json
├── .gitignore
├── .editorconfig
├── README.md
└── src/
├── Tables/
│ ├── AMPAllocationSetup.Table.al
│ ├── AMPAllocationKeyHeader.Table.al
│ ├── AMPAllocationKeyLine.Table.al
│ ├── AMPAllocationSourceFilter.Table.al
│ ├── AMPAllocationRunHistory.Table.al
│ └── AMPAllocationRunBuffer.Table.al
├── Pages/
│ ├── AMPAllocationSetup.Page.al
│ ├── AMPAllocationKeyList.Page.al
│ ├── AMPAllocationKeyCard.Page.al
│ ├── AMPAllocationKeyLines.Page.al
│ ├── AMPAllocationSourceFilters.Page.al
│ ├── AMPAllocationRun.Page.al
│ ├── AMPAllocationRunPreview.Page.al
│ ├── AMPAllocationRunHistory.Page.al
│ └── AMPAllocationRunHistoryCard.Page.al
├── PageExtensions/
│ └── AMPGLAccountCardExt.PageExt.al
├── Codeunits/
│ ├── AMPAllocationEngine.Codeunit.al
│ ├── AMPAllocationICPPosting.Codeunit.al
│ └── AMPAllocationInstall.Codeunit.al
├── Enums/
│ ├── AMPAllocationKeyType.Enum.al
│ └── AMPAllocationRunStatus.Enum.al
└── permissionset/
├── 80700_ASMEAAll_permissionset.al
└── 80701_ASMEARead_permissionset.al
Object ID map
| Range | Object | ID |
|---|---|---|
| Tables | AMP Allocation Setup |
80700 |
AMP Allocation Key Header |
80701 | |
AMP Allocation Key Line |
80702 | |
AMP Allocation Source Filter |
80703 | |
AMP Allocation Run History |
80704 | |
AMP Allocation Run Buffer |
80705 | |
| Pages | AMP Allocation Setup |
80700 |
AMP Allocation Key List |
80701 | |
AMP Allocation Key Card |
80702 | |
AMP Allocation Key Lines |
80703 | |
AMP Allocation Source Filters |
80704 | |
AMP Allocation Run |
80705 | |
AMP Allocation Run Preview |
80706 | |
AMP Allocation Run History |
80707 | |
AMP Allocation Run History Card |
80708 | |
| Page Ext | AMP G/L Account Card Ext |
80700 |
| Codeunits | AMP Allocation Engine |
80700 |
AMP Allocation ICP Posting |
80701 | |
AMP Allocation Install |
80702 | |
| Enums | AMP Allocation Key Type |
80700 |
AMP Allocation Run Status |
80701 | |
| Permission sets | ASMEAAll |
80700 |
ASMEARead |
80701 |
Range used: 21 / 100 objects.