---
id: object/table/221
type: object
title: Table 221 "Gen. Jnl. Allocation"
summary: Table 221 "Gen. Jnl. Allocation" in Base Application (Microsoft.Finance.GeneralLedger.Journal). 25 fields, 13 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28-29.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 7c053580610f9f2eb02bc9f9312ebe0b6b62231ad128b1c77da0ed9ecdf4f2e4
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJnlAllocation.Table.al
    title: src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJnlAllocation.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/ui-how-use-allocation-keys-general-journals
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/set-up-business-central/set-up-finance
  localizations:
    - localization/it
    - localization/ru
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 221
name: Gen. Jnl. Allocation
namespace: Microsoft.Finance.GeneralLedger.Journal
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries:
  - it
  - ru
ms_search_form_ids: []
counts:
  fields: 25
  procedures: 35
  events: 14
  subscribers: 0
relations:
  out: 14
  referenced_by: 1
  pages: 1
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Table 221 "Gen. Jnl. Allocation"

> Table 221 "Gen. Jnl. Allocation" in Base Application (Microsoft.Finance.GeneralLedger.Journal). 25 fields, 13 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28-29.

Base Application · Microsoft.Finance.GeneralLedger.Journal · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJnlAllocation.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 284 "Allocations"](../page/284.md) (1 Learn page).

## Properties

| Property | Value |
|---|---|
| Caption | Gen. Jnl. Allocation |
| DataClassification | CustomerContent |
| Permissions | tabledata "Gen. Jnl. Allocation" = R |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Journal Template Name | Code[10] | — | TableRelation [Table 80 "Gen. Journal Template"](../table/80.md) (Gen. Journal Template) |
| 2 | Journal Batch Name | Code[10] | — | TableRelation [Table 232 "Gen. Journal Batch"](../table/232.md) ("Gen. Journal Batch".Name where("Journal Template Name" = field("Journal Template Name"))) |
| 3 | Journal Line No. | Integer | — | TableRelation [Table 81 "Gen. Journal Line"](../table/81.md) ("Gen. Journal Line"."Line No." where("Journal Template Name" = field("Journal Template Name"), "Journal Batch Name" = field("Journal Batch Name"))) |
| 4 | Line No. | Integer | — |  |
| 5 | Account No. | Code[20] | Specifies the account number that the allocation will be posted to. | TableRelation [Table 15 "G/L Account"](../table/15.md) (G/L Account) |
| 6 | Shortcut Dimension 1 Code | Code[20] | Specifies the code for Shortcut Dimension 1, which is one of two global dimension codes that you set up in the General Ledger Setup window. | TableRelation [Table 349 "Dimension Value"](../table/349.md) ("Dimension Value".Code where("Global Dimension No." = const(1), Blocked = const(false))) |
| 7 | Shortcut Dimension 2 Code | Code[20] | Specifies the code for Shortcut Dimension 2, which is one of two global dimension codes that you set up in the General Ledger Setup window. | TableRelation [Table 349 "Dimension Value"](../table/349.md) ("Dimension Value".Code where("Global Dimension No." = const(2), Blocked = const(false))) |
| 8 | Allocation Quantity | Decimal | Specifies the quantity that will be used to calculate the amount in the allocation journal line. |  |
| 9 | Allocation % | Decimal | Specifies the percentage that will be used to calculate the amount in the allocation journal line. |  |
| 10 | Amount | Decimal | Specifies the amount that will be posted from the allocation journal line. |  |
| 11 | Gen. Posting Type | Enum "General Posting Type" | Specifies the type of transaction. | enum [Enum 57 "General Posting Type"](../enum/57.md) |
| 12 | Gen. Bus. Posting Group | Code[20] | Specifies the vendor's or customer's trade type to link transactions made for this business partner with the appropriate general ledger account according to the general posting setup. | TableRelation [Table 250 "Gen. Business Posting Group"](../table/250.md) (Gen. Business Posting Group) |
| 13 | Gen. Prod. Posting Group | Code[20] | Specifies the item's product type to link transactions made for this item with the appropriate general ledger account according to the general posting setup. | TableRelation [Table 251 "Gen. Product Posting Group"](../table/251.md) (Gen. Product Posting Group) |
| 14 | VAT Calculation Type | Enum "Tax Calculation Type" | — | enum [Enum 254 "Tax Calculation Type"](../enum/254.md); not editable |
| 15 | VAT Amount | Decimal | — | not editable |
| 16 | VAT % | Decimal | — | not editable |
| 17 | Account Name | Text[100] | Specifies the name of the account that the allocation will be posted to. | FlowField: lookup("G/L Account".Name where("No." = field("Account No."))); not editable |
| 18 | Tax Area Code | Code[20] | — | TableRelation [Table 318 "Tax Area"](../table/318.md) (Tax Area) |
| 19 | Tax Liable | Boolean | — |  |
| 20 | Tax Group Code | Code[20] | — | TableRelation [Table 321 "Tax Group"](../table/321.md) (Tax Group) |
| 21 | Use Tax | Boolean | — |  |
| 22 | VAT Bus. Posting Group | Code[20] | Specifies the VAT specification of the involved customer or vendor to link transactions made for this record with the appropriate general ledger account according to the VAT posting setup. | TableRelation [Table 323 "VAT Business Posting Group"](../table/323.md) (VAT Business Posting Group) |
| 23 | VAT Prod. Posting Group | Code[20] | Specifies the VAT specification of the involved item or resource to link transactions made for this record with the appropriate general ledger account according to the VAT posting setup. | TableRelation [Table 324 "VAT Product Posting Group"](../table/324.md) (VAT Product Posting Group) |
| 24 | Additional-Currency Amount | Decimal | — | not editable |
| 480 | Dimension Set ID | Integer | — | TableRelation [Table 480 "Dimension Set Entry"](../table/480.md) (Dimension Set Entry); not editable |

## Keys

- Key1: Journal Template Name, Journal Batch Name, Journal Line No., Line No. (clustered)

## Events published

- `OnAfterInitDefaultDimensionSources(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; var DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])` (integration): Integration event raised after initializing default dimension sources for allocation line dimension creation. Enables custom modification of dimension sources before dimension set creation for allocation lines.
- `OnBeforeCreateDim(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; var IsHandled: Boolean)` (integration): Integration event raised before creating dimension set for allocation line. Enables custom logic to completely override standard dimension creation processing for allocations.
- `OnAfterCreateDimProcedure(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; CurrFieldNo: Integer; DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]; xGenJnlAllocation: Record "Gen. Jnl. Allocation"; OldDimSetID: Integer)` (integration): Integration event raised after completing dimension creation procedure for allocation line. Enables custom processing and validation after standard dimension set creation is completed.
- `OnAfterShowDimensions(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; xGenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration): Integration event raised after displaying dimensions page for allocation line. Enables custom processing after user interaction with allocation line dimensions.
- `OnAfterValidateShortcutDimCode(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; var xGenJnlAllocation: Record "Gen. Jnl. Allocation"; FieldNumber: Integer; var ShortcutDimCode: Code[20])` (integration): Integration event raised after validating shortcut dimension code for allocation line. Enables custom processing after shortcut dimension validation and dimension set updates.
- `OnBeforeValidateShortcutDimCode(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; var xGenJnlAllocation: Record "Gen. Jnl. Allocation"; FieldNumber: Integer; var ShortcutDimCode: Code[20])` (integration): Integration event raised before validating shortcut dimension code for allocation line. Enables custom logic to override standard shortcut dimension validation processing.
- `OnUpdateAllocationsOnAfterGenJnlAllocModify(var GenJnlAlloc: Record "Gen. Jnl. Allocation")` (integration): Integration event that occurs after modifying a general journal allocation line during update process. Allows customization of allocation line processing after standard modification logic.
- `OnUpdateAllocationsOnBeforeGenJnlAllocModify(GenJournalLine: Record "Gen. Journal Line"; var GenJnlAlloc: Record "Gen. Jnl. Allocation")` (integration): Integration event that occurs before modifying a general journal allocation line during update process. Allows customization of allocation line values before standard modification logic.
- `OnUpdateAllocationsAddCurrOnAfterGenJnlAllocModify(var GenJnlAlloc: Record "Gen. Jnl. Allocation")` (integration): Integration event raised after modifying allocation line during additional currency allocation updates. Enables custom processing after allocation line changes during ACY amount distribution.
- `OnBeforeCheckGLAccount(GLAccount: Record "G/L Account"; var IsHandled: Boolean; var GenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration): Integration event raised before validating G/L account setup for allocation line. Enables custom logic to override standard G/L account validation processing for allocations.
- `OnAfterCheckGLAccount(var GLAccount: Record "G/L Account"; GenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration): Integration event raised after validating G/L account setup for allocation line. Enables custom processing and validation after standard G/L account checks are completed.
- `OnBeforeUpdateVAT(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean; var GenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration): Integration event raised before updating VAT amounts for allocation line. Enables custom logic to completely override standard VAT update processing for allocations.
- `OnAfterUpdateVAT(var GenJournalLine: Record "Gen. Journal Line"; GenJournalLine2: Record "Gen. Journal Line"; var GenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration): Integration event raised after updating VAT amounts for allocation line. Enables custom processing after standard VAT calculation and update is completed.
- `OnBeforeValidateAccountNo(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; xGenJnlAllocation: Record "Gen. Jnl. Allocation"; var IsHandled: Boolean)` (integration): Integration event raised before validating account number for allocation line. Enables custom logic to completely override standard account number validation processing.

## Procedures

- `CopyVATSetupToJnlLines(): Boolean` (protected)
- `UpdateAllocations(var GenJnlLine: Record "Gen. Journal Line")`: Updates allocation amounts and distributions for all allocation lines associated with the specified journal line. Recalculates allocation percentages and amounts to ensure total allocation equals journal line amount.
- `UpdateAllocationsAddCurr(var GenJnlLine: Record "Gen. Journal Line"; AddCurrAmount: Decimal)`: Updates allocation amounts in additional reporting currency for all allocation lines associated with the specified journal line. Converts allocation amounts to additional currency using current exchange rates.
- `CheckVAT(var GenJnlLine: Record "Gen. Journal Line")`: Validates VAT setup and calculations for this allocation line based on the associated journal line context. Ensures VAT posting groups and calculation types are compatible with journal line requirements.
- `UpdateVAT(var GenJnlLine: Record "Gen. Journal Line")`: Updates VAT amounts and percentages for this allocation line based on current VAT setup and allocation amount. Calculates VAT amount using VAT posting group configuration and allocation base amount.
- `GetCurrencyCode(): Code[10]`: Retrieves the currency code applicable to this allocation line based on the associated journal line. Returns the journal line's currency code or LCY if no specific currency is defined.
- `CreateDim(DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])`: Creates dimension set for this allocation line from the specified default dimension sources. Builds dimension combinations for financial analysis and reporting requirements.
- `ValidateShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])`: Validates shortcut dimension code for the specified dimension and updates the allocation line's dimension set. Ensures dimension values are valid and updates the dimension set ID accordingly.
- `LookupShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])`: Opens lookup for shortcut dimension code selection and updates the allocation line's dimension set. Provides user interface for selecting valid dimension values for the specified dimension.
- `ShowShortcutDimCode(var ShortcutDimCode: array[8] of Code[20])`: Retrieves and displays shortcut dimension codes for this allocation line in the provided array. Populates shortcut dimension code array with current dimension values for display purposes.
- `ShowDimensions()`: Opens the dimensions page to display and allow editing of all dimensions for this allocation line. Provides comprehensive dimension management interface for detailed financial analysis setup.
- `CreateDimFromDefaultDim()`: Creates dimension set for this allocation line from default dimension setup for the G/L account. Automatically applies standard dimension configuration based on account and posting group defaults.
- `ChooseAndImportFromAllocationAccount()` (internal)

Plus 8 local procedures.

## Triggers

OnDelete, OnInsert

## Relations

- Account Name: CalcFormula [Table 15 "G/L Account"](../table/15.md)
- Account No.: TableRelation [Table 15 "G/L Account"](../table/15.md)
- Journal Batch Name: TableRelation [Table 232 "Gen. Journal Batch"](../table/232.md)
- Gen. Bus. Posting Group: TableRelation [Table 250 "Gen. Business Posting Group"](../table/250.md)
- Gen. Prod. Posting Group: TableRelation [Table 251 "Gen. Product Posting Group"](../table/251.md)
- Tax Area Code: TableRelation [Table 318 "Tax Area"](../table/318.md)
- Tax Group Code: TableRelation [Table 321 "Tax Group"](../table/321.md)
- VAT Bus. Posting Group: TableRelation [Table 323 "VAT Business Posting Group"](../table/323.md)
- VAT Prod. Posting Group: TableRelation [Table 324 "VAT Product Posting Group"](../table/324.md)
- Shortcut Dimension 1 Code: TableRelation [Table 349 "Dimension Value"](../table/349.md)
- Shortcut Dimension 2 Code: TableRelation [Table 349 "Dimension Value"](../table/349.md)
- Dimension Set ID: TableRelation [Table 480 "Dimension Set Entry"](../table/480.md)
- Journal Template Name: TableRelation [Table 80 "Gen. Journal Template"](../table/80.md)
- Journal Line No.: TableRelation [Table 81 "Gen. Journal Line"](../table/81.md)

## Referenced by

1 fields in 1 objects relate to this table (TableRelation or CalcFormula).

- [Table 81 "Gen. Journal Line"](../table/81.md): Allocated Amt. (LCY)

## Pages and codeunits on this table

- [Page 284 "Allocations"](../page/284.md) (source table)

## 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 408 "DimensionManagement"](../codeunit/408.md) (7 calls: `CreateDim → GetRecDefaultDimID`, `InitDefaultDimensionSources → AddDimSource`, `LookupShortcutDimCode → LookupDimValueCode`, …)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (1 call: `ImportFromAllocationAccount → GetResponse`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC28-29

## Countries that replace it

[IT](../../localizations/it.md), [RU](../../localizations/ru.md)

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: "table", object_name: "Gen. Jnl. Allocation")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
