---
id: object/codeunit/6461
type: object
title: Codeunit 6461 "Serv. Document Print"
summary: Codeunit 6461 "Serv. Document Print" in Base Application (Microsoft.Foundation.Reporting). 8 public procedures, 6 events, 3 event subscribers. Introduced in BC25, still in BC30, changed in BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: "25"
  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: 5f7d5886552d1ec2c74c92597dc6bb387028b8b62ac68f73e3aff8d21917a61c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/Document/ServDocumentPrint.Codeunit.al
    title: src/Layers/W1/BaseApp/Service/Document/ServDocumentPrint.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/ru
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 6461
name: Serv. Document Print
namespace: Microsoft.Foundation.Reporting
app: Base Application
extends: null
first_version: "25"
last_version: "30"
present_in:
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
source_major: "29"
obsolete: null
countries:
  - ru
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 20
  events: 6
  subscribers: 3
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 0
  implements: 0
---

# Codeunit 6461 "Serv. Document Print"

> Codeunit 6461 "Serv. Document Print" in Base Application (Microsoft.Foundation.Reporting). 8 public procedures, 6 events, 3 event subscribers. Introduced in BC25, still in BC30, changed in BC28.

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

## Events published

- `OnBeforeCalcServDisc(var ServiceHeader: Record "Service Header"; var IsHandled: Boolean)` (integration)
- `OnBeforePrintServiceHeader(var ServiceHeader: Record "Service Header"; ReportUsage: Integer; var IsPrinted: Boolean)` (integration)
- `OnBeforePrintServiceItemWorksheet(var ServiceItemLine: Record "Service Item Line"; ReportUsage: Enum "Report Selection Usage"; var IsPrinted: Boolean)` (integration)
- `OnBeforePrintServiceContract(var ServiceContractHeader: Record "Service Contract Header"; ReportUsage: Integer; var IsPrinted: Boolean)` (integration)
- `OnGetServHeaderDocTypeUsageElseCase(ServiceHeader: Record "Service Header"; var TypeUsage: Integer; var IsHandled: Boolean)` (integration)
- `OnGetServContractTypeUsageElseCase(ServiceContractHeader: Record "Service Contract Header"; var TypeUsage: Integer; var IsHandled: Boolean)` (integration)

## Event subscriptions

- OnAfterIsCustomerAccount subscribes to Table "Report Selections" OnAfterIsCustomerAccount
- OnSendEmailDirectlyOnAfterSetFieldName subscribes to Table "Report Selections" OnSendEmailDirectlyOnAfterSetFieldName
- InitReportSelection subscribes to Codeunit "Report Selection Mgt." OnInitReportUsage

## Procedures

- `PrintServiceHeader(ServiceHeader: Record "Service Header")`
- `PrintServiceItemWorksheet(ServiceItemLine: Record "Service Item Line")`
- `PrintServiceContract(ServiceContractHeader: Record "Service Contract Header")`
- `CalcServDisc(var ServHeader: Record "Service Header")`
- `GetServContractTypeUsage(ServiceContractHeader: Record "Service Contract Header"): Enum "Report Selection Usage"`
- `GetServHeaderDocTypeUsage(ServiceHeader: Record "Service Header"): Enum "Report Selection Usage"`
- `PrintServiceHeaderToDocumentAttachment(var ServiceHeader: Record "Service Header")`
- `PrintServiceContractToDocumentAttachment(var ServiceContractHeader: Record "Service Contract Header")`

Plus 3 local procedures.

## 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 5950 "Service-Calc. Discount"](../codeunit/5950.md) (1 call: `CalcServDisc → (object)`)

## Across versions

- Present in: BC25-30
- Changed (declaration) in: BC28

## Countries that replace it

[RU](../../localizations/ru.md)

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: "Serv. Document Print")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
