---
id: object/table/5964
type: object
title: Table 5964 "Service Contract Line"
summary: Table 5964 "Service Contract Line" in Base Application (Microsoft.Service.Contract). 31 fields, 12 public procedures, 26 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: 59c596983425d8839ea43c0c7974cbe16c7e2471d5b5ac1f4f441fd5001e2d6c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/Contract/ServiceContractLine.Table.al
    title: src/Layers/W1/BaseApp/Service/Contract/ServiceContractLine.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5964
name: Service Contract Line
namespace: Microsoft.Service.Contract
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: 31
  procedures: 46
  events: 26
  subscribers: 0
relations:
  out: 11
  referenced_by: 5
  pages: 5
  extended_by: 0
  event_subscribers: 5
  calls: 5
  called_by: 0
  implements: 0
---

# Table 5964 "Service Contract Line"

> Table 5964 "Service Contract Line" in Base Application (Microsoft.Service.Contract). 31 fields, 12 public procedures, 26 events. Present since at least BC23, still in BC30, changed in BC24, BC28.

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

## Properties

| Property | Value |
|---|---|
| Caption | Service Contract Line |
| 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 | Contract Type | Enum "Service Contract Type" | Specifies the type of the contract. | enum [Enum 5965 "Service Contract Type"](../enum/5965.md) |
| 2 | Contract No. | Code[20] | Specifies the number of the service contract or service contract quote associated with the service contract line. | TableRelation [Table 5965 "Service Contract Header"](../table/5965.md) ("Service Contract Header"."Contract No." where("Contract Type" = field("Contract Type"))) |
| 3 | Line No. | Integer | — |  |
| 4 | Contract Status | Enum "Service Contract Status" | Specifies the status of the contract. | enum [Enum 5967 "Service Contract Status"](../enum/5967.md) |
| 5 | Service Item No. | Code[20] | Specifies the number of the service item that is subject to the service contract. | TableRelation [Table 5940 "Service Item"](../table/5940.md) ("Service Item" where(Blocked = filter(" "))) |
| 6 | Description | Text[100] | Specifies the description of the service item that is subject to the contract. |  |
| 7 | Serial No. | Code[50] | Specifies the serial number of the service item that is subject to the contract. |  |
| 8 | Service Item Group Code | Code[10] | — | TableRelation [Table 5904 "Service Item Group"](../table/5904.md) (Service Item Group) |
| 9 | Customer No. | Code[20] | Specifies the number of the customer associated with the service contract. | TableRelation [Table 18 "Customer"](../table/18.md) |
| 10 | 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."))); not editable |
| 11 | Item No. | Code[20] | Specifies the number of the item linked to the service item in the service contract. | TableRelation [Table 27 "Item"](../table/27.md) (Item where(Type = const(Inventory), Blocked = const(false), "Service Blocked" = const(false))) |
| 12 | Unit of Measure Code | Code[10] | Specifies how each unit of the item or resource is measured, such as in pieces or hours. By default, the value in the Base Unit of Measure field on the item or resource card is inserted. | TableRelation [Table 204 "Unit of Measure"](../table/204.md), [Table 5404 "Item Unit of Measure"](../table/5404.md) (if ("Item No." = filter(<> '')) "Item Unit of Measure".Code where("Item No." = field("Item No.")) else "Unit of Measure") |
| 13 | Response Time (Hours) | Decimal | Specifies the response time for the service item associated with the service contract. <small>via [Page 6075 "Serv. Contr. List (Serv. Item)"](../page/6075.md)</small> |  |
| 14 | Last Planned Service Date | Date | Specifies the date of the last planned service on this item. | not editable |
| 15 | Next Planned Service Date | Date | Specifies the date of the next planned service on the item included in the contract. |  |
| 16 | Last Service Date | Date | Specifies the date when the service item on the line was last serviced. |  |
| 17 | Last Preventive Maint. Date | Date | Specifies the date when the last time preventative service was performed on this item. | not editable |
| 18 | Invoiced to Date | Date | — | not editable |
| 19 | Credit Memo Date | Date | Specifies the date when you can create a credit memo for the service item that needs to be removed from the service contract. |  |
| 20 | Contract Expiration Date | Date | Specifies the date when an item should be removed from the contract. |  |
| 21 | Service Period | DateFormula | Specifies the period of time that must pass between each servicing of an item. |  |
| 22 | Line Value | Decimal | Specifies the value of the service item line in the contract or contract quote. |  |
| 23 | Line Discount % | Decimal | Specifies the discount percentage that is granted for the item on the line. |  |
| 24 | Line Amount | Decimal | Specifies the net amount, excluding any invoice discount amount, that must be paid for products on the line. |  |
| 28 | Variant Code | Code[10] | Specifies the variant of the item on the line. | TableRelation [Table 5401 "Item Variant"](../table/5401.md) ("Item Variant".Code where("Item No." = field("Item No."), Blocked = const(false), "Service Blocked" = const(false))) |
| 29 | Starting Date | Date | Specifies the starting date of the service contract. | not editable |
| 30 | New Line | Boolean | Specifies whether the service contract line is new or existing. | not editable |
| 31 | Credited | Boolean | Specifies if the service contract line has been credited. |  |
| 32 | Line Cost | Decimal | Specifies the calculated cost of the service item line in the service contract or contract quote. |  |
| 33 | Line Discount Amount | Decimal | Specifies the discount amount that is granted for the item on the line. |  |
| 34 | Profit | Decimal | Specifies the profit, expressed as the difference between the Line Amount and Line Cost fields on the service contract line. |  |

## Keys

- Key1: Contract Type, Contract No., Line No. (clustered)
- Key2: Contract No., Line No., Contract Type
- Key3: Service Item No., Contract Status
- Key4: Contract Type, Contract No., Credited, New Line
- Key5: Customer No., Ship-to Code

## Events published

- `OnAfterCalculateNextServiceVisit(ServContractHeader: Record "Service Contract Header"; ServMgtSetup: Record "Service Mgt. Setup")` (integration)
- `OnAfterGetServiceItem(ServiceContractLine: Record "Service Contract Line"; var ServiceItem: Record "Service Item")` (integration)
- `OnAfterLogContractLineChanges(var ServiceContractLine: Record "Service Contract Line"; xServiceContractLine: Record "Service Contract Line")` (integration)
- `OnAfterSetupNewLine(var ServiceContractLine: Record "Service Contract Line"; ServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnAfterTestStatusOpen(ServiceContractLine: Record "Service Contract Line"; CurrentFieldNo: Integer)` (integration)
- `OnBeforeCheckServContractHeader(ServContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckCreditMemoDate(var ServiceContractLine: Record "Service Contract Line"; xServiceContractLine: Record "Service Contract Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCreditMemoBaseExists(ServiceContractLine: Record "Service Contract Line"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateContractExpirationDate(var ServiceContractLine: Record "Service Contract Line"; var xServiceContractLine: Record "Service Contract Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateLineAmount(var ServiceContractLine: Record "Service Contract Line"; var xServiceContractLine: Record "Service Contract Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateLineDiscountPercent(var ServiceContractLine: Record "Service Contract Line"; var xServiceContractLine: Record "Service Contract Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)` (integration)
- `OnCalculateOtherLineAmountsOnAfterSetFilters(var ServiceContractLine: Record "Service Contract Line")` (integration)
- `OnUpdateContractAnnualAmountOnAfterGetServContractHeader(var ServiceContractLine: Record "Service Contract Line"; ServContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnValidateServiceItemNoOnAfterCalcServiceItemNoIsNotEmpty(var ServiceContractLine: Record "Service Contract Line"; var ServiceItemNoIsNotEmpty: Boolean; xServiceContractLine: Record "Service Contract Line"; var HideDialog: Boolean)` (integration)
- `OnValidateServiceItemNoOnBeforeCheckSameItemExist(var ServiceContractLine: Record "Service Contract Line"; var IsHandled: Boolean)` (integration)
- `OnValidateServiceItemNoOnAfterServContractLineSetFiltersWithContractStatus(var ServiceContractLine: Record "Service Contract Line"; var ServContractLine: Record "Service Contract Line")` (integration)
- `OnValidateServiceItemNoOnBeforeCheckSameCustomer(ServItem: Record "Service Item"; var ServContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnValidateServiceItemNoOnBeforeModify(ServItem: Record "Service Item"; ServContractHeader: Record "Service Contract Header")` (integration)
- `OnValidateServiceItemNoOnAfterInit(var ServContractLineRec: Record "Service Contract Line"; ServContractLine: Record "Service Contract Line")` (integration)
- `OnValidateServiceItemNoOnBeforeOnValidate(var ServiceContractLine: Record "Service Contract Line"; xServiceContractLine: Record "Service Contract Line"; var IsHandled: Boolean)` (integration)
- `OnValidateServiceItemNoOnBeforeCheckServContractHeaderStatus(var ServiceContractLine: Record "Service Contract Line"; xServiceContractLine: Record "Service Contract Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeSetupNewLine(var ServiceContractLine: Record "Service Contract Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCalculateNextServiceVisit(var ServiceContractLine: Record "Service Contract Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeSelectMultipleServiceItems(var ServiceContractLine: Record "Service Contract Line")` (integration)
- `OnAfterSelectMultipleServiceItems(var ServiceContractLine: Record "Service Contract Line")` (integration)
- `OnBeforeAddServiceItems(var ServiceContractLine: Record "Service Contract Line"; SelectionFilter: Text; var IsHandled: Boolean)` (integration)

## Trigger event subscribers

- OnAfterDeleteEvent: [Codeunit 6459 "Serv. Document Attachment Mgt."](../codeunit/6459.md) DeleteAttachedDocumentsOnAfterDeleteServiceContractLine
- OnAfterInsertEvent: [Codeunit 6459 "Serv. Document Attachment Mgt."](../codeunit/6459.md) DocumentAttachmentFlow_ForServiceContractLineInsert
- OnAfterValidateEvent(Item No.): [Codeunit 6459 "Serv. Document Attachment Mgt."](../codeunit/6459.md) DocumentAttachmentFlow_ForServiceContractLineItemNoChange
- OnAfterValidateEvent(Service Item No.): [Codeunit 6459 "Serv. Document Attachment Mgt."](../codeunit/6459.md) DocumentAttachmentFlow_ForServiceContractLineServiceItemNoChange
- OnBeforeInsertEvent: [Codeunit 5999 "Service Experience Tier"](../codeunit/5999.md) BlockInsertServiceContractLine

## Procedures

- `SetupNewLine()`
- `CalculateNextServiceVisit()`
- `UpdateContractAnnualAmount(Deleting: Boolean)`
- `HideDialogBox(Hide: Boolean)`
- `TestStatusOpen()`
- `GetStatusCheckSuspended(): Boolean`
- `SuspendStatusCheck(Suspend: Boolean)`
- `ShowComments()`
- `ValidateServicePeriod(CurrentDate: Date)`
- `CreditMemoBaseExists(): Boolean`
- `LogContractLineChanges(ServContractLine2: Record "Service Contract Line")`
- `SelectMultipleServiceItems()`

Plus 8 local procedures.

## Triggers

OnDelete, OnInsert, OnModify

## Relations

- drill-down page [Page 6075 "Serv. Contr. List (Serv. Item)"](../page/6075.md)
- lookup page [Page 6075 "Serv. Contr. List (Serv. Item)"](../page/6075.md)
- Customer No.: TableRelation [Table 18 "Customer"](../table/18.md)
- Unit of Measure Code: TableRelation [Table 204 "Unit of Measure"](../table/204.md) (conditional)
- Ship-to Code: TableRelation [Table 222 "Ship-to Address"](../table/222.md)
- Item No.: TableRelation [Table 27 "Item"](../table/27.md)
- Variant Code: TableRelation [Table 5401 "Item Variant"](../table/5401.md)
- Unit of Measure Code: TableRelation [Table 5404 "Item Unit of Measure"](../table/5404.md) (conditional)
- Service Item Group Code: TableRelation [Table 5904 "Service Item Group"](../table/5904.md)
- Service Item No.: TableRelation [Table 5940 "Service Item"](../table/5940.md)
- Contract No.: TableRelation [Table 5965 "Service Contract Header"](../table/5965.md)

## Referenced by

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

- [Table 5940 "Service Item"](../table/5940.md): No. of Active Contracts, Service Contracts
- [Table 5901 "Service Item Line"](../table/5901.md): Contract Line No.
- [Table 5965 "Service Contract Header"](../table/5965.md): Calcd. Annual Amount
- [Table 6011 "Service Item Line Archive"](../table/6011.md): Contract Line No.

## Pages and codeunits on this table

- [Page 6052 "Service Contract Subform"](../page/6052.md) (source table)
- [Page 6054 "Service Contract Quote Subform"](../page/6054.md) (source table)
- [Page 6075 "Serv. Contr. List (Serv. Item)"](../page/6075.md) (source table)
- [Page 6076 "Serv. Item List (Contract)"](../page/6076.md) (source table)
- [Page 6078 "Service Contract Line List"](../page/6078.md) (source table)
- [Codeunit 5945 "CreateCreditfromContractLines"](../codeunit/5945.md) (codeunit runs on it)

## 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 5906 "ServLogManagement"](../codeunit/5906.md) (4 calls: `OnDelete → ServItemRemovedFromContract`, `OnInsert → ServItemAddToContract`, `OnModify → ServItemAddToContract`, …)
- [Codeunit 5940 "ServContractManagement"](../codeunit/5940.md) (3 calls: `CreditMemoBaseExists → CalcContractLineAmount`, `CreditMemoBaseExists → FindFirstPrepaidTransaction`, `GetServItem → CheckServiceItemBlockedForServiceContract`)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (1 call: `OnDelete → GetResponseOrDefault`)
- [Codeunit 5945 "CreateCreditfromContractLines"](../codeunit/5945.md) (1 call: `OnDelete → (object)`)
- [Page 5911 "Service Comment Sheet"](../page/5911.md) (1 call: `ShowComments → (object)`)

## 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). 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 Contract Line")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
