---
id: object/table/5907
type: object
title: Table 5907 "Service Ledger Entry"
summary: Table 5907 "Service Ledger Entry" in Base Application (Microsoft.Service.Ledger). 64 fields, 6 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24, BC26, 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: d44a78868c51f883c33d25ec60575708a1f4992ff4869c839eb3cf9ddaa6ad86
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/Ledger/ServiceLedgerEntry.Table.al
    title: src/Layers/W1/BaseApp/Service/Ledger/ServiceLedgerEntry.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10867
    - change/bcapps/10345
object_type: table
object_id: 5907
name: Service Ledger Entry
namespace: Microsoft.Service.Ledger
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 64
  procedures: 8
  events: 2
  subscribers: 0
relations:
  out: 39
  referenced_by: 17
  pages: 2
  extended_by: 0
  event_subscribers: 3
  calls: 3
  called_by: 0
  implements: 0
---

# Table 5907 "Service Ledger Entry"

> Table 5907 "Service Ledger Entry" in Base Application (Microsoft.Service.Ledger). 64 fields, 6 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28-29.

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

## Properties

| Property | Value |
|---|---|
| Caption | Service Ledger Entry |
| 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 | Entry No. | Integer | Specifies the number of the entry, as assigned from the specified number series when the entry was created. |  |
| 2 | Service Contract No. | Code[20] | Specifies the number of the service contract, if this entry is linked to a service contract. | TableRelation [Table 5965 "Service Contract Header"](../table/5965.md) ("Service Contract Header"."Contract No." where("Contract Type" = const(Contract))) |
| 3 | Document Type | Enum "Service Ledger Entry Document Type" | Specifies the document type of the service ledger entry. | enum [Enum 5909 "Service Ledger Entry Document Type"](../enum/5909.md) |
| 4 | Document No. | Code[20] | Specifies the number of the document from which this entry was created. |  |
| 5 | Serv. Contract Acc. Gr. Code | Code[10] | Specifies the service contract account group code the service contract is associated with, if this entry is included in a service contract. | TableRelation [Table 5973 "Service Contract Account Group"](../table/5973.md) ("Service Contract Account Group".Code) |
| 6 | Document Line No. | Integer | — |  |
| 8 | Moved from Prepaid Acc. | Boolean | Specifies that this entry is not a prepaid entry from a service contract. |  |
| 9 | Posting Date | Date | Specifies the date when this entry was posted. |  |
| 11 | Amount (LCY) | Decimal | Specifies the amount of the entry in LCY. <small>via [Page 168 "Service Ledger Entries Preview"](../page/168.md)</small> |  |
| 12 | Customer No. | Code[20] | Specifies the number of the customer related to this entry. | TableRelation [Table 18 "Customer"](../table/18.md) |
| 13 | Ship-to Code | Code[10] | Specifies a code for an alternate shipment address if you want to ship to another address than the one that has been entered automatically. This field is also used in case of drop shipment. | TableRelation [Table 222 "Ship-to Address"](../table/222.md) ("Ship-to Address".Code where("Customer No." = field("Customer No."))) |
| 14 | Item No. (Serviced) | Code[20] | Specifies the number of the serviced item associated with this entry. <small>via [Page 168 "Service Ledger Entries Preview"](../page/168.md)</small> | TableRelation [Table 27 "Item"](../table/27.md) |
| 15 | Serial No. (Serviced) | Code[50] | Specifies the serial number of the serviced item associated with this entry. <small>via [Page 168 "Service Ledger Entries Preview"](../page/168.md)</small> |  |
| 16 | User ID | Code[50] | Specifies the ID of the user who posted the entry, to be used, for example, in the change log. | TableRelation User."User Name"; DataClassification EndUserIdentifiableInformation |
| 17 | Contract Invoice Period | Text[30] | Specifies the invoice period of that contract, if this entry originates from a service contract. |  |
| 18 | Global Dimension 1 Code | Code[20] | Specifies the code for the global dimension that is linked to the record or entry for analysis purposes. Two global dimensions, typically for the company's most important activities, are available on all cards, documents, reports, and lists. | TableRelation [Table 349 "Dimension Value"](../table/349.md) ("Dimension Value".Code where("Global Dimension No." = const(1))) |
| 19 | Global Dimension 2 Code | Code[20] | Specifies the code for the global dimension that is linked to the record or entry for analysis purposes. Two global dimensions, typically for the company's most important activities, are available on all cards, documents, reports, and lists. | TableRelation [Table 349 "Dimension Value"](../table/349.md) ("Dimension Value".Code where("Global Dimension No." = const(2))) |
| 20 | Service Item No. (Serviced) | Code[20] | Specifies the number of the serviced item associated with this entry. <small>via [Page 168 "Service Ledger Entries Preview"](../page/168.md)</small> | TableRelation [Table 5940 "Service Item"](../table/5940.md) (Service Item) |
| 21 | Variant Code (Serviced) | Code[10] | — | TableRelation [Table 5401 "Item Variant"](../table/5401.md) ("Item Variant".Code where("Item No." = field("Item No. (Serviced)"))) |
| 22 | Contract Group Code | Code[10] | Specifies the contract group code of the service contract to which this entry is associated. | TableRelation [Table 5966 "Contract Group"](../table/5966.md) ("Contract Group".Code) |
| 23 | Type | Enum "Service Ledger Entry Type" | Specifies the type of origin of this entry. | enum [Enum 5907 "Service Ledger Entry Type"](../enum/5907.md) |
| 24 | No. | Code[20] | Specifies the number of the involved entry or record, according to the specified number series. | TableRelation [Table 156 "Resource"](../table/156.md), [Table 27 "Item"](../table/27.md), [Table 5905 "Service Cost"](../table/5905.md) (if (Type = const("Service Contract")) "Service Contract Header"."Contract No." where("Contract Type" = const(Contract)) else if (Type = const(" ")) "Standard Text" else if (Type = const(Item)) Item else if (Type = const(Resource)) Resource else if (Type = const("Service Cost")) "Service Cost" else i...) |
| 25 | Cost Amount | Decimal | Specifies the total cost on the line by multiplying the unit cost by the quantity. |  |
| 26 | Discount Amount | Decimal | Specifies the total discount amount on this entry. |  |
| 27 | Unit Cost | Decimal | Specifies the cost of one unit of the item or resource on the line. |  |
| 28 | Quantity | Decimal | Specifies the number of units in this entry. |  |
| 29 | Charged Qty. | Decimal | Specifies the number of units in this entry that should be invoiced. |  |
| 30 | Unit Price | Decimal | Specifies the price of one unit of the item or resource. You can enter a price manually or have it entered according to the Price/Profit Calculation field on the related card. |  |
| 31 | Discount % | Decimal | Specifies the discount percentage of this entry. |  |
| 32 | Contract Disc. Amount | Decimal | Specifies the total contract discount amount of this entry. |  |
| 33 | Bill-to Customer No. | Code[20] | Specifies the number of the customer that you send or sent the invoice or credit memo to. | TableRelation [Table 18 "Customer"](../table/18.md) |
| 34 | Fault Reason Code | Code[10] | Specifies the fault reason code for this entry. | TableRelation [Table 5917 "Fault Reason Code"](../table/5917.md) (Fault Reason Code) |
| 35 | Description | Text[100] | Specifies a description of the resource, item, cost, standard text, general ledger account, or service contract associated with this entry. |  |
| 37 | Service Order Type | Code[10] | Specifies the type of the service order if this entry was created for a service order. | TableRelation [Table 5903 "Service Order Type"](../table/5903.md) (Service Order Type) |
| 39 | Service Order No. | Code[20] | Specifies the number of the service order, if this entry was created for a service order. |  |
| 40 | Job No. | Code[20] | Specifies the number of the related project. | TableRelation Job."No." |
| 41 | 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) |
| 42 | 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) |
| 43 | Location Code | Code[10] | Specifies the code for the location associated with this entry. | TableRelation [Table 14 "Location"](../table/14.md) |
| 44 | Unit of Measure Code | Code[10] | — | TableRelation [Table 204 "Unit of Measure"](../table/204.md) (Unit of Measure) |
| 45 | Work Type Code | Code[10] | — | TableRelation [Table 200 "Work Type"](../table/200.md) (Work Type) |
| 46 | Bin Code | Code[20] | Specifies the bin where the items are picked or put away. | TableRelation [Table 7354 "Bin"](../table/7354.md) (Bin.Code where("Location Code" = field("Location Code"))) |
| 47 | Responsibility Center | Code[10] | — | TableRelation [Table 5714 "Responsibility Center"](../table/5714.md) (Responsibility Center) |
| 48 | Variant Code | Code[10] | — | TableRelation [Table 5401 "Item Variant"](../table/5401.md) (if (Type = const(Item)) "Item Variant".Code where("Item No." = field("No."))) |
| 50 | Entry Type | Enum "Service Ledger Entry Entry Type" | Specifies the type for this entry. | enum [Enum 5908 "Service Ledger Entry Entry Type"](../enum/5908.md) |
| 51 | Open | Boolean | Specifies contract-related service ledger entries. |  |
| 52 | Serv. Price Adjmt. Gr. Code | Code[10] | — | TableRelation [Table 6082 "Service Price Adjustment Group"](../table/6082.md) (Service Price Adjustment Group) |
| 53 | Service Price Group Code | Code[10] | — | TableRelation [Table 6080 "Service Price Group"](../table/6080.md) (Service Price Group) |
| 54 | Prepaid | Boolean | Specifies whether the service contract or contract-related service order was prepaid. |  |
| 55 | Apply Until Entry No. | Integer | — |  |
| 56 | Applies-to Entry No. | Integer | Specifies the number of the entry to which this entry is applied, if an entry is created for a service credit memo. |  |
| 57 | Amount | Decimal | Specifies the amount on this entry. |  |
| 58 | Job Task No. | Code[20] | Specifies the number of the related project task. | TableRelation [Table 1001 "Job Task"](../table/1001.md) ("Job Task"."Job Task No." where("Job No." = field("Job No."))) |
| 59 | Job Line Type | Enum "Job Line Type" | Specifies the journal line type that is created in the Project Planning Line table and linked to this project ledger entry. | enum [Enum 1002 "Job Line Type"](../enum/1002.md) |
| 60 | Job Posted | Boolean | Project Posted <small>caption</small> |  |
| 61 | External Document No. | Code[35] | Specifies a document number that refers to the customer's numbering system. |  |
| 95 | Service Register No. | Integer | Specifies the service register number that this entry belongs to. | TableRelation [Table 5934 "Service Register"](../table/5934.md) (Service Register); not editable |
| 480 | Dimension Set ID | Integer | Specifies a reference to a combination of dimension values. The actual values are stored in the Dimension Set Entry table. | TableRelation [Table 480 "Dimension Set Entry"](../table/480.md) (Dimension Set Entry); not editable |
| 481 | Shortcut Dimension 3 Code | Code[20] | Specifies the code for Shortcut Dimension 3, which is one of dimension codes that you set up in the General Ledger Setup window. | FlowField: lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), "Global Dimension No." = const(3))); not editable |
| 482 | Shortcut Dimension 4 Code | Code[20] | Specifies the code for Shortcut Dimension 4, which is one of dimension codes that you set up in the General Ledger Setup window. | FlowField: lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), "Global Dimension No." = const(4))); not editable |
| 483 | Shortcut Dimension 5 Code | Code[20] | Specifies the code for Shortcut Dimension 5, which is one of dimension codes that you set up in the General Ledger Setup window. | FlowField: lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), "Global Dimension No." = const(5))); not editable |
| 484 | Shortcut Dimension 6 Code | Code[20] | Specifies the code for Shortcut Dimension 6, which is one of dimension codes that you set up in the General Ledger Setup window. | FlowField: lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), "Global Dimension No." = const(6))); not editable |
| 485 | Shortcut Dimension 7 Code | Code[20] | Specifies the code for Shortcut Dimension 7, which is one of dimension codes that you set up in the General Ledger Setup window. | FlowField: lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), "Global Dimension No." = const(7))); not editable |
| 486 | Shortcut Dimension 8 Code | Code[20] | Specifies the code for Shortcut Dimension 8, which is one of dimension codes that you set up in the General Ledger Setup window. | FlowField: lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), "Global Dimension No." = const(8))); not editable |

## Keys

- Key1: Entry No. (clustered)
- Key2: Document No., Posting Date
- Key3: Entry Type, Document Type, Document No., Document Line No.
- Key4: Service Contract No., Entry No., Entry Type, Type, Moved from Prepaid Acc., Posting Date, Open, Prepaid, Service Item No. (Serviced), Customer No., Contract Group Code, Responsibility Center
- Key5: Service Order No., Service Item No. (Serviced), Entry Type, Moved from Prepaid Acc., Posting Date, Open, Type, Service Contract No.
- Key6: Type, No., Entry Type, Moved from Prepaid Acc., Posting Date, Open, Prepaid
- Key7: Service Item No. (Serviced), Entry Type, Moved from Prepaid Acc., Type, Posting Date, Open, Service Contract No., Prepaid, Customer No., Contract Group Code, Responsibility Center
- Key8: Service Item No. (Serviced), Entry Type, Type, Service Contract No., Posting Date, Service Order No.
- Key9: Service Register No.
- Key10: Service Contract No., Service Item No. (Serviced), Entry Type, Applies-to Entry No.

## Events published

- `OnAfterCopyFromServHeader(var ServiceLedgerEntry: Record "Service Ledger Entry"; ServiceHeader: Record "Service Header")` (integration)
- `OnAfterCopyFromServLine(var ServiceLedgerEntry: Record "Service Ledger Entry"; ServiceLine: Record "Service Line")` (integration)

## Trigger event subscribers

- OnAfterInsertEvent: [Codeunit 6499 "Serv. Posting Preview Handler"](../codeunit/6499.md) OnInsertServiceLedgerEntry
- OnAfterModifyEvent: [Codeunit 6499 "Serv. Posting Preview Handler"](../codeunit/6499.md) OnModifyServiceLedgerEntry
- OnBeforeInsertEvent: [Codeunit 5999 "Service Experience Tier"](../codeunit/5999.md) BlockInsertServiceLedgerEntry

## Procedures

- `GetNextEntryNo(): Integer`: Gets the next entry number for the Service Ledger Entry table.
- `GetLastEntryNo(): Integer`
- `ShowDimensions()`
- `CopyFromServHeader(ServHeader: Record "Service Header")`
- `CopyFromServLine(ServLine: Record "Service Line"; DocNo: Code[20])`
- `CopyServicedInfo(ServiceItemNo: Code[20]; ItemNo: Code[20]; SerialNo: Code[50]; VariantCode: Code[10])`

## Relations

- drill-down page [Page 5912 "Service Ledger Entries"](../page/5912.md)
- lookup page [Page 5912 "Service Ledger Entries"](../page/5912.md)
- Job Task No.: TableRelation [Table 1001 "Job Task"](../table/1001.md)
- Location Code: TableRelation [Table 14 "Location"](../table/14.md)
- No.: TableRelation [Table 156 "Resource"](../table/156.md) (conditional)
- Bill-to Customer No.: TableRelation [Table 18 "Customer"](../table/18.md)
- Customer No.: TableRelation [Table 18 "Customer"](../table/18.md)
- Work Type Code: TableRelation [Table 200 "Work Type"](../table/200.md)
- Unit of Measure Code: TableRelation [Table 204 "Unit of Measure"](../table/204.md)
- Ship-to Code: TableRelation [Table 222 "Ship-to Address"](../table/222.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)
- Item No. (Serviced): TableRelation [Table 27 "Item"](../table/27.md)
- No.: TableRelation [Table 27 "Item"](../table/27.md) (conditional)
- Global Dimension 1 Code: TableRelation [Table 349 "Dimension Value"](../table/349.md)
- Global Dimension 2 Code: TableRelation [Table 349 "Dimension Value"](../table/349.md)
- Shortcut Dimension 3 Code: CalcFormula [Table 480 "Dimension Set Entry"](../table/480.md)
- Shortcut Dimension 4 Code: CalcFormula [Table 480 "Dimension Set Entry"](../table/480.md)
- Shortcut Dimension 5 Code: CalcFormula [Table 480 "Dimension Set Entry"](../table/480.md)
- Shortcut Dimension 6 Code: CalcFormula [Table 480 "Dimension Set Entry"](../table/480.md)
- Shortcut Dimension 7 Code: CalcFormula [Table 480 "Dimension Set Entry"](../table/480.md)
- Shortcut Dimension 8 Code: CalcFormula [Table 480 "Dimension Set Entry"](../table/480.md)
- Dimension Set ID: TableRelation [Table 480 "Dimension Set Entry"](../table/480.md)
- Variant Code: TableRelation [Table 5401 "Item Variant"](../table/5401.md)
- Variant Code (Serviced): TableRelation [Table 5401 "Item Variant"](../table/5401.md)
- Responsibility Center: TableRelation [Table 5714 "Responsibility Center"](../table/5714.md)
- Service Order Type: TableRelation [Table 5903 "Service Order Type"](../table/5903.md)
- No.: TableRelation [Table 5905 "Service Cost"](../table/5905.md) (conditional)
- Fault Reason Code: TableRelation [Table 5917 "Fault Reason Code"](../table/5917.md)
- Service Register No.: TableRelation [Table 5934 "Service Register"](../table/5934.md)
- Service Item No. (Serviced): TableRelation [Table 5940 "Service Item"](../table/5940.md)
- No.: TableRelation [Table 5965 "Service Contract Header"](../table/5965.md) (conditional)
- Service Contract No.: TableRelation [Table 5965 "Service Contract Header"](../table/5965.md)
- Contract Group Code: TableRelation [Table 5966 "Contract Group"](../table/5966.md)
- Serv. Contract Acc. Gr. Code: TableRelation [Table 5973 "Service Contract Account Group"](../table/5973.md)
- Service Price Group Code: TableRelation [Table 6080 "Service Price Group"](../table/6080.md)
- Serv. Price Adjmt. Gr. Code: TableRelation [Table 6082 "Service Price Adjustment Group"](../table/6082.md)
- No.: TableRelation [Table 7 "Standard Text"](../table/7.md) (conditional)
- Bin Code: TableRelation [Table 7354 "Bin"](../table/7354.md)

## Referenced by

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

- [Table 5940 "Service Item"](../table/5940.md): Contract Cost, Cost Used, Invoiced Amount, Parts Used, Prepaid Amount, Resources Used, Total Qty. Consumed, Total Qty. Invoiced, Total Quantity, Usage (Amount), Usage (Cost)
- [Table 5965 "Service Contract Header"](../table/5965.md): Contract Cost Amount, Contract Discount Amount, Contract Invoice Amount, Contract Prepaid Amount
- [Table 5934 "Service Register"](../table/5934.md): From Entry No., To Entry No.

## Pages and codeunits on this table

- [Page 168 "Service Ledger Entries Preview"](../page/168.md) (source table)
- [Page 5912 "Service Ledger Entries"](../page/5912.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) (1 call: `ShowDimensions → ShowDimensionSet`)
- [Codeunit 703 "Find Record Management"](../codeunit/703.md) (1 call: `GetLastEntryNo → GetLastEntryIntFieldValue`)
- [Codeunit 9500 "Sequence No. Mgt."](../codeunit/9500.md) (1 call: `GetNextEntryNo → GetNextSeqNo`)

## Recent changes

- 2026-09-03 [#10867 [29.x][ALL-E]Issues with Service Contract Invoicing and Retrospective Billing--when the second unposted Service Invoice is deleted the values on the Service Contract are no longer reset--The "Invoiced to Date" field does not resetInitial commit- #10345Initial commit](../../changes/bcapps/10867.md) (releases/29.x, BC29, fix)
- 2026-09-03 [#10345 [Main][ALL-E]Issues with Service Contract Invoicing and Retrospective Billing--when the second unposted Service Invoice is deleted the values on the Service Contract are no longer reset--The "Invoiced to Date" field does not resetInitial commit](../../changes/bcapps/10345.md) (main, BC30, fix)

## Across versions

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

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: "Service Ledger Entry")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
