---
id: object/table/5809
type: object
title: Table 5809 "Item Charge Assignment (Sales)"
summary: Table 5809 "Item Charge Assignment (Sales)" in Base Application (Microsoft.Sales.Document). 17 fields, 2 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24, BC28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 0418c2ed9f3980f5a422a617c10f82a9f0877764b322a8a43a45294070856339
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Document/ItemChargeAssignmentSales.Table.al
    title: src/Layers/W1/BaseApp/Sales/Document/ItemChargeAssignmentSales.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/payables-how-assign-item-charges
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/finance/manage-inventory-costs
    - topic/business-central/business-functionality/finance/manage-payables
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5809
name: Item Charge Assignment (Sales)
namespace: Microsoft.Sales.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 17
  procedures: 5
  events: 1
  subscribers: 0
relations:
  out: 6
  referenced_by: 3
  pages: 1
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 5809 "Item Charge Assignment (Sales)"

> Table 5809 "Item Charge Assignment (Sales)" in Base Application (Microsoft.Sales.Document). 17 fields, 2 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24, BC28.

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

Learn documents this table through its pages: [Page 5814 "Item Charge Assignment (Sales)"](../page/5814.md) (1 Learn page).

## Properties

| Property | Value |
|---|---|
| Caption | Item Charge Assignment (Sales) |
| DataClassification | CustomerContent |

## 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 | Document Type | Enum "Sales Document Type" | — | enum [Enum 36 "Sales Document Type"](../enum/36.md) |
| 2 | Document No. | Code[20] | — | TableRelation [Table 36 "Sales Header"](../table/36.md) ("Sales Header"."No." where("Document Type" = field("Document Type"))) |
| 3 | Document Line No. | Integer | — | TableRelation [Table 37 "Sales Line"](../table/37.md) ("Sales Line"."Line No." where("Document Type" = field("Document Type"), "Document No." = field("Document No."))) |
| 4 | Line No. | Integer | — |  |
| 5 | Item Charge No. | Code[20] | — | TableRelation [Table 5800 "Item Charge"](../table/5800.md) (Item Charge); NotBlank |
| 6 | Item No. | Code[20] | Specifies the item number on the document line that this item charge is assigned to. | TableRelation [Table 27 "Item"](../table/27.md) |
| 7 | Description | Text[100] | Specifies a description of the item on the document line that this item charge is assigned to. |  |
| 8 | Qty. to Assign | Decimal | Specifies how many units of the item charge will be assigned to the document line. If the document has more than one line of type Item, then this quantity reflects the distribution that you selected when you chose the Suggest Item Charge Assignment action. |  |
| 9 | Qty. Assigned | Decimal | Specifies the number of units of the item charge will be assigned to the document line. | not editable |
| 10 | Unit Cost | Decimal | — |  |
| 11 | Amount to Assign | Decimal | Specifies the value of the item charge that is going to be assigned to the document line. |  |
| 12 | Applies-to Doc. Type | Enum "Sales Applies-to Document Type" | Specifies the type of the document that this document or journal line will be applied to when you post, for example to register payment. | enum [Enum 5809 "Sales Applies-to Document Type"](../enum/5809.md) |
| 13 | Applies-to Doc. No. | Code[20] | Specifies the number of the document that this document or journal line will be applied to when you post, for example to register payment. | TableRelation [Table 36 "Sales Header"](../table/36.md) (if ("Applies-to Doc. Type" = const(Order)) "Sales Header"."No." where("Document Type" = const(Order)) else if ("Applies-to Doc. Type" = const(Invoice)) "Sales Header"."No." where("Document Type" = const(Invoice)) else if ("Applies-to Doc. Type" = const("Return Order")) "Sales Header"."No." where("Do...) |
| 14 | Applies-to Doc. Line No. | Integer | Specifies the number of the line on the document that this document or journal line will be applied to when you post, for example to register payment. | TableRelation [Table 37 "Sales Line"](../table/37.md) (if ("Applies-to Doc. Type" = const(Order)) "Sales Line"."Line No." where("Document Type" = const(Order), "Document No." = field("Applies-to Doc. No.")) else if ("Applies-to Doc. Type" = const(Invoice)) "Sales Line"."Line No." where("Document Type" = const(Invoice), "Document No." = field("Applies-to...) |
| 15 | Applies-to Doc. Line Amount | Decimal | — |  |
| 16 | Qty. to Handle | Decimal | Specifies how many items the item charge will be assigned to on the line. It can be either equal to Qty. to Assign or to zero. If it is zero, the item charge will not be assigned to the line. |  |
| 17 | Amount to Handle | Decimal | Specifies the value of the item charge that will be actually assigned to the document line. |  |

## Keys

- Key1: Document Type, Document No., Document Line No., Line No. (clustered)
- Key2: Applies-to Doc. Type, Applies-to Doc. No., Applies-to Doc. Line No.
- Key3: Applies-to Doc. Type

## Events published

- `OnAfterSalesLineInvoiced(ItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)"; var SalesLine: Record "Sales Line"; var Result: Boolean)` (integration)

## Procedures

- `SalesLineInvoiced(): Boolean`: Checks whether the applied-to sales line is fully invoiced.
- `CheckAssignment(AppliesToDocumentType: Enum "Sales Applies-to Document Type"; AppliesToDocumentNo: Code[20]; AppliesToDocumentLineNo: Integer)`: Checks if item charge assignments exist for the specified document line and raises an error if found.

Plus 2 local procedures.

## Triggers

OnDelete

## Relations

- Item No.: TableRelation [Table 27 "Item"](../table/27.md)
- Applies-to Doc. No.: TableRelation [Table 36 "Sales Header"](../table/36.md) (conditional)
- Document No.: TableRelation [Table 36 "Sales Header"](../table/36.md)
- Applies-to Doc. Line No.: TableRelation [Table 37 "Sales Line"](../table/37.md) (conditional)
- Document Line No.: TableRelation [Table 37 "Sales Line"](../table/37.md)
- Item Charge No.: TableRelation [Table 5800 "Item Charge"](../table/5800.md)

## Referenced by

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

- [Table 37 "Sales Line"](../table/37.md): Item Charge Qty. to Handle, Qty. Assigned, Qty. to Assign

## Pages and codeunits on this table

- [Page 5814 "Item Charge Assignment (Sales)"](../page/5814.md) (source table)

## Across versions

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

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). 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: "Item Charge Assignment (Sales)")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
