---
id: object/codeunit/5944
type: object
title: Codeunit 5944 "SignServContractDoc"
summary: Codeunit 5944 "SignServContractDoc" in Base Application (Microsoft.Service.Contract). 6 public procedures, 47 events. Present since at least BC23, still in BC30, changed in BC24-25, BC29.
tier: official
language: en
tags:
  - codeunit
  - 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: 88a8665862f9f39a36a4786dcbe19ddb0543051bbd5a442eadb240e41d988cd2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/Contract/SignServContractDoc.Codeunit.al
    title: src/Layers/W1/BaseApp/Service/Contract/SignServContractDoc.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5944
name: SignServContractDoc
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"
  - "25"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 72
  events: 47
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 4
  called_by: 1
  implements: 0
---

# Codeunit 5944 "SignServContractDoc"

> Codeunit 5944 "SignServContractDoc" in Base Application (Microsoft.Service.Contract). 6 public procedures, 47 events. Present since at least BC23, still in BC30, changed in BC24-25, BC29.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Service Contract Header |
| Permissions | tabledata "Filed Service Contract Header" = rimd |

## Events published

- `OnAddendumToContractOnAfterServContractLineLoop(var ServContractLine: Record "Service Contract Line"; var StartingDate: Date)` (integration)
- `OnAddendumToContractOnAfterAssignPostingDate(var PostingDate: Date; var InvoiceFrom: Date)` (integration)
- `OnAddendumToContractOnAfterSetStartingDate(FromServContractHeader: Record "Service Contract Header"; var StartingDate: Date)` (integration)
- `OnAddendumToContractOnBeforeServContractLineLoop(ServContractLine: Record "Service Contract Line"; var StartingDate: Date)` (integration)
- `OnAfterCreateServiceLinesForRemainingAmt(FromServContractHeader: Record "Service Contract Header")` (integration)
- `OnAddendumToContractOnAfterCalcCreateInvoiceConfirmed(ServContractHeader: Record "Service Contract Header"; var CreateInvoiceConfirmed: Boolean)` (integration)
- `OnAddendumToContractOnAfterCalcShouldCreateServHeader(var ServiceHeaderNo: Code[20]; var ServContractManagement: Codeunit ServContractManagement; FromServiceContractHeader: Record "Service Contract Header"; PostingDate: Date; var ShouldCreateServHeader: Boolean)` (integration)
- `OnAfterCreateServiceLinesLedgerEntries(var ServiceHeader: Record "Service Header"; ServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnAfterToServContractHeaderInsert(var ToServiceContractHeader: Record "Service Contract Header"; FromServiceContractHeader: Record "Service Contract Header")` (integration)
  - subscribers: [Codeunit 6459 "Serv. Document Attachment Mgt."](../codeunit/6459.md) DocumentAttachmentFlow_FromServiceContractQuoteHeaderToServiceContractHeader
- `OnAfterToServContractLineInsert(var ToServiceContractLine: Record "Service Contract Line"; FromServiceContractLine: Record "Service Contract Line")` (integration)
  - subscribers: [Codeunit 6459 "Serv. Document Attachment Mgt."](../codeunit/6459.md) DocumentAttachmentFlow_FromServiceContractQuoteLineToServiceContractLine
- `OnBeforeAddendumToContract(var ServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnBeforeCheckServContract(var ServiceContractHeader: Record "Service Contract Header"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckServContractHasZeroAmounts(ServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckContractHeaderServicePeriod(ServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckMissingServiceContractLines(ServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeClearServContractLineNewLine(FromServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeServContractHeaderModify(var ServiceContractHeader: Record "Service Contract Header"; FromServiceContractHeader: Record "Service Contract Header"; InvoicingStartingPeriod: Boolean; InvoiceNow: Boolean; InvoiceFrom: Date; InvoiceTo: Date)` (integration)
- `OnBeforeToServContractHeaderInsert(var ToServiceContractHeader: Record "Service Contract Header"; FromServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnBeforeToServContractLineInsert(var ToServiceContractLine: Record "Service Contract Line"; FromServiceContractLine: Record "Service Contract Line")` (integration)
- `OnBeforeSignContract(var ServiceContractHeader: Record "Service Contract Header"; var HideDialog: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeSignContractQuote(var ServiceContractHeader: Record "Service Contract Header"; var HideDialog: Boolean)` (integration)
- `OnBeforeSetInvoicing(var ServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean; var InvoiceNow: Boolean; var InvoiceFrom: Date; var InvoiceTo: Date; var InvoicingStartingPeriod: Boolean; var GoOut: Boolean; HideDialog: Boolean)` (integration)
- `OnAfterSetInvoicing(var ServiceContractHeader: Record "Service Contract Header"; var InvoiceNow: Boolean; var InvoiceFrom: Date; var InvoiceTo: Date; var InvoicingStartingPeriod: Boolean; var GoOut: Boolean; HideDialog: Boolean)` (integration)
- `OnAfterSignContractQuote(var SourceServiceContractHeader: Record "Service Contract Header"; var DestServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnSignContractQuoteOnBeforeToServContractHeaderModify(var ServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnAddendumToContractOnBeforeCreateServiceLinesLedgerEntries(var ServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnBeforeCheckServContractNextInvoiceDate(ServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateServiceLinesForRemainingAmt(var ServHeader: Record "Service Header"; var FromServContractHeader: Record "Service Contract Header"; var FirstPrepaidPostingDate: Date; var LastPrepaidPostingDate: Date; var AppliedEntry: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckServContractQuote(var ServiceContractHeader: Record "Service Contract Header"; HideDialog: Boolean; var IsHandled: Boolean)` (integration)
- `OnAfterCheckServContractQuote(var ServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnBeforeCheckServContractNonZeroAmounts(var ServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckServContractDatesDimensionsAndResponseTime(ServiceContractHeader: Record "Service Contract Header"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateServiceLinesLedgerEntries(var ServiceContractHeader: Record "Service Contract Header"; NewLine: Boolean; var IsHandled: Boolean; var ServHeaderNo: Code[20]; PostingDate: Date; InvoiceFrom: Date; InvoiceTo: Date)` (integration)
- `OnBeforeDeleteServContractHeader(ServiceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)` (integration)
- `OnCheckServContractQuoteOnAfterCheckServItemCustomerNo(var ServiceContractLine: Record "Service Contract Line"; ServiceContractHeader: Record "Service Contract Header"; ServItem: Record "Service Item")` (integration)
- `OnCheckServContractHasZeroAmountsOnAfterServContractLineSetFilters(var ServiceContractLine: Record "Service Contract Line")` (integration)
- `OnCopyServCommentsOnAfterToServCommentLineInsert(var FromServCommentLine: Record "Service Comment Line"; var ToServCommentLine: Record "Service Comment Line")` (integration)
- `OnSignContractQuoteOnChangeStatusOnBeforeToServContractHeaderModify(var ToServContractHeader: Record "Service Contract Header")` (integration)
- `OnSignContractOnAfterServContractLineNewLineFalse(var ServContractLine: Record "Service Contract Line")` (integration)
- `OnSignContractOnBeforeFindServContractLine(var ServiceContractLine: Record "Service Contract Line"; var FromServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnSignContractOnAfterServContractHeaderModify(var ServiceContractHeader: Record "Service Contract Header"; FromServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnAfterSignContract(var ServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnAddendumToContractOnBeforeConfirmCalcCreateInvoice(FromServiceContractHeader: Record "Service Contract Header"; ServiceContractHeader: Record "Service Contract Header"; var CreateInvoiceConfirmed: Boolean; var IsHandled: Boolean)` (integration)
- `OnSignContractQuoteOnBeforeSetFromServContractLineFilters(var FromServiceContractHeader: Record "Service Contract Header"; var ToServiceContractHeader: Record "Service Contract Header")` (integration)
- `OnSignContractOnBeforeSetServContractLineFilters(var ServiceContractLine: Record "Service Contract Line"; FromServiceContractHeader: Record "Service Contract Header"; var WPostLine: Integer; var IsHandled: Boolean)` (integration)
- `OnAddendumToContractOnBeforeCalcCreateInvoiceConfirmed(GoOut: Boolean; HideDialog: Boolean; var InvoiceNow: Boolean; var InvoicePrepaid: Boolean; LastPrepaidPostingDate: Date; StartingDate: Date; TempDate: Date; var IsHandled: Boolean)` (integration)
- `OnCheckServContractNextPlannedServiceDateOnAfterServContractLineSetFilters(var ServiceContractLine: Record "Service Contract Line"; var ServiceContractHeader: Record "Service Contract Header")` (integration)

## Procedures

- `SignContractQuote(FromServContractHeader: Record "Service Contract Header")`
- `SignContract(FromServContractHeader: Record "Service Contract Header")`
- `AddendumToContract(ServContractHeader: Record "Service Contract Header")`
- `SetHideDialog(NewHideDialog: Boolean)`
- `GetHideDialog(): Boolean`
- `CheckServContract(var ServContractHeader: Record "Service Contract Header"): Boolean`

Plus 19 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 5965 "Service Contract Header"](../table/5965.md)

## 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 5940 "ServContractManagement"](../codeunit/5940.md) (22 calls: `AddendumToContract → CheckContractGroupAccounts`, `AddendumToContract → CreateServHeader`, `AddendumToContract → FindFirstPrepaidTransaction`, …)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (6 calls: `AddendumToContract → GetResponseOrDefault`, `CheckServContractNextInvoiceDate → GetResponseOrDefault`, `CheckServContractNextPlannedServiceDate → GetResponseOrDefault`, …)
- [Codeunit 447 "Record Link Management"](../codeunit/447.md) (1 call: `SignContractQuote → CopyLinks`)
- [Codeunit 5943 "Lock-OpenServContract"](../codeunit/5943.md) (1 call: `SignContract → LockServContract`)

## Called by

- [Codeunit 5943 "Lock-OpenServContract"](../codeunit/5943.md) (1 call: `SignServContract → AddendumToContract`)

## Across versions

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

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: "codeunit", object_name: "SignServContractDoc")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
