---
id: object/table/5476
type: object
title: Table 5476 "Sales Invoice Line Aggregate"
summary: Table 5476 "Sales Invoice Line Aggregate" in Base Application (Microsoft.Integration.Entity). 45 fields, 6 public procedures. 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: 9050c85ad0ef37760ff1eb16795de74ed0d35248042b796055a09ad468f76e2b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/Entity/SalesInvoiceLineAggregate.Table.al
    title: src/Layers/W1/BaseApp/Integration/Entity/SalesInvoiceLineAggregate.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesInvoiceLine_create
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesinvoiceline_delete
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesinvoiceline_get
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesinvoiceline_update
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_salesinvoiceline
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesOrderLine_create
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesorderline_delete
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesorderline_get
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesorderline_update
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_salesorderline
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesQuoteLine_create
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesquoteline_delete
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesquoteline_get
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesquoteline_update
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_salesquoteline
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesCreditMemoLine_create
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salescreditmemoline_delete
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salescreditmemoline_get
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salescreditmemoline_update
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_salescreditmemoline
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5476
name: Sales Invoice Line Aggregate
namespace: Microsoft.Integration.Entity
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: 45
  procedures: 12
  events: 0
  subscribers: 0
relations:
  out: 11
  referenced_by: 0
  pages: 8
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 5476 "Sales Invoice Line Aggregate"

> Table 5476 "Sales Invoice Line Aggregate" in Base Application (Microsoft.Integration.Entity). 45 fields, 6 public procedures. Present since at least BC23, still in BC30, changed in BC24, BC28.

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

Learn documents this table through its pages: [Page 30043 "APIV2 - Sales Invoice Lines"](../page/30043.md) (5 Learn pages), [Page 30044 "APIV2 - Sales Order Lines"](../page/30044.md) (5), [Page 30045 "APIV2 - Sales Quote Lines"](../page/30045.md) (5), [Page 30046 "APIV2 - Sales Credit Mem Lines"](../page/30046.md) (5).

## Properties

| Property | Value |
|---|---|
| Caption | Sales Invoice Line Aggregate |
| TableType | Temporary |
| 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 |
|---|---|---|---|---|
| 4 | Line No. | Integer | Specifies the sales invoice lines sequence. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 5 | Type | Enum "Sales Line Type" | — | enum [Enum 37 "Sales Line Type"](../enum/37.md) |
| 6 | No. | Code[20] | — |  |
| 7 | Location Code | Code[10] | — | TableRelation [Table 14 "Location"](../table/14.md) (Location where("Use As In-Transit" = const(false))) |
| 10 | Shipment Date | Date | Specifies the shipment date. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 11 | Description | Text[100] | Specifies the description of the sales invoice line. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 12 | Description 2 | Text[50] | — |  |
| 15 | Quantity | Decimal | Specifies the quantity. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 17 | Qty. to Invoice | Decimal | Specifies the quantity to invoice. <small>via [Page 20044 "APIV1 - Sales Order Lines"](../page/20044.md)</small> |  |
| 18 | Qty. to Ship | Decimal | Specifies the quantity to ship. <small>via [Page 20044 "APIV1 - Sales Order Lines"](../page/20044.md)</small> |  |
| 22 | Unit Price | Decimal | Specifies the unit price. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 25 | VAT % | Decimal | Specifies the tax percent. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 27 | Line Discount % | Decimal | Specifies the line discount percent. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 28 | Line Discount Amount | Decimal | Specifies the line discount amount. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 29 | Amount | Decimal | Specifies the net amount. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 30 | Amount Including VAT | Decimal | Specifies the net amount including tax. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 60 | Quantity Shipped | Decimal | Specifies the shipped quantity. <small>via [Page 20044 "APIV1 - Sales Order Lines"](../page/20044.md)</small> | not editable |
| 61 | Quantity Invoiced | Decimal | Specifies the invoiced quantity. <small>via [Page 20044 "APIV1 - Sales Order Lines"](../page/20044.md)</small> | not editable |
| 69 | Inv. Discount Amount | Decimal | — | not editable |
| 87 | Tax Group Code | Code[20] | — | TableRelation [Table 321 "Tax Group"](../table/321.md) (Tax Group) |
| 90 | VAT Prod. Posting Group | Code[20] | — | TableRelation [Table 324 "VAT Product Posting Group"](../table/324.md) (VAT Product Posting Group) |
| 91 | Currency Code | Code[10] | — | TableRelation [Table 4 "Currency"](../table/4.md) |
| 99 | VAT Base Amount | Decimal | — |  |
| 103 | Line Amount | Decimal | — |  |
| 180 | Line Discount Calculation | Option | — | OptionCaption: None,%,Amount |
| 5402 | Variant Code | Code[10] | — | TableRelation [Table 5401 "Item Variant"](../table/5401.md) (if (Type = const(Item)) "Item Variant".Code where("Item No." = field("No."))) |
| 5407 | Unit of Measure Code | Code[10] | — | TableRelation [Table 204 "Unit of Measure"](../table/204.md), [Table 205 "Resource Unit of Measure"](../table/205.md), [Table 5404 "Item Unit of Measure"](../table/5404.md) (if (Type = const(Item), "No." = filter(<> '')) "Item Unit of Measure".Code where("Item No." = field("No.")) else if (Type = const(Resource), "No." = filter(<> '')) "Resource Unit of Measure".Code where("Resource No." = field("No.")) else "Unit of Measure") |
| 8000 | Document Id | Guid | Specifies the document ID. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 8001 | Id | Text[50] | Specifies the ID. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 8002 | Variant Id | Guid | Specifies the item variant id. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> | TableRelation [Table 5401 "Item Variant"](../table/5401.md) (if (Type = const(Item)) "Item Variant".SystemId where("Item No." = field("No."))) |
| 9020 | Tax Code | Code[50] | Specifies the tax code. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 9021 | Tax Amount | Decimal | Specifies the net tax amount. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 9022 | Discount Applied Before Tax | Boolean | Specifies the discount applied before tax. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 9029 | API Type | Enum "Invoice Line Agg. Line Type" | Specifies the API Type. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> | enum [Enum 5478 "Invoice Line Agg. Line Type"](../enum/5478.md) |
| 9030 | Item Id | Guid | Specifies the Item Id. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> | TableRelation Item.SystemId |
| 9031 | Account Id | Guid | Specifies the Account Id. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> | TableRelation [Table 15 "G/L Account"](../table/15.md) ("G/L Account".SystemId) |
| 9032 | Unit of Measure Id | Guid | — | TableRelation [Table 204 "Unit of Measure"](../table/204.md) ("Unit of Measure".SystemId) |
| 9039 | Line Tax Amount | Decimal | Specifies the tax amount. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 9040 | Line Amount Including Tax | Decimal | Specifies the line amount including tax. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 9041 | Line Amount Excluding Tax | Decimal | Specifies the line amount excluding tax. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 9042 | Prices Including Tax | Boolean | — |  |
| 9043 | Inv. Discount Amount Excl. VAT | Decimal | Specifies the invoice discount amount excluding tax. <small>via [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md)</small> |  |
| 9044 | Tax Id | Guid | — |  |
| 9050 | Line Discount Value | Decimal | — |  |
| 9070 | Location Id | Guid | — | TableRelation Location.SystemId |

## Keys

- Key1: Document Id, Line No. (clustered)
- Key2: Id

## Procedures

- `UpdateItemId()`
- `UpdateAccountId()`
- `UpdateNo()`
- `UpdateReferencedRecordIds()`
- `UpdateLineDiscounts()`
- `SetDiscountValue()`

Plus 6 local procedures.

## Triggers

OnInsert, OnModify, OnRename

## Relations

- Location Code: TableRelation [Table 14 "Location"](../table/14.md)
- Account Id: TableRelation [Table 15 "G/L Account"](../table/15.md)
- Unit of Measure Code: TableRelation [Table 204 "Unit of Measure"](../table/204.md) (conditional)
- Unit of Measure Id: TableRelation [Table 204 "Unit of Measure"](../table/204.md)
- Unit of Measure Code: TableRelation [Table 205 "Resource Unit of Measure"](../table/205.md) (conditional)
- Tax Group Code: TableRelation [Table 321 "Tax Group"](../table/321.md)
- VAT Prod. Posting Group: TableRelation [Table 324 "VAT Product Posting Group"](../table/324.md)
- Currency Code: TableRelation [Table 4 "Currency"](../table/4.md)
- Variant Code: TableRelation [Table 5401 "Item Variant"](../table/5401.md)
- Variant Id: TableRelation [Table 5401 "Item Variant"](../table/5401.md)
- Unit of Measure Code: TableRelation [Table 5404 "Item Unit of Measure"](../table/5404.md) (conditional)

## Pages and codeunits on this table

- [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md) (source table)
- [Page 20044 "APIV1 - Sales Order Lines"](../page/20044.md) (source table)
- [Page 20045 "APIV1 - Sales Quote Lines"](../page/20045.md) (source table)
- [Page 20046 "APIV1 - Sales Credit Mem Lines"](../page/20046.md) (source table)
- [Page 30043 "APIV2 - Sales Invoice Lines"](../page/30043.md) (source table)
- [Page 30044 "APIV2 - Sales Order Lines"](../page/30044.md) (source table)
- [Page 30045 "APIV2 - Sales Quote Lines"](../page/30045.md) (source table)
- [Page 30046 "APIV2 - Sales Credit Mem Lines"](../page/30046.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: "Sales Invoice Line Aggregate")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
