---
id: object/codeunit/6451
type: object
title: Codeunit 6451 "Serv. Time Sheet Mgt."
summary: Codeunit 6451 "Serv. Time Sheet Mgt." in Base Application (Microsoft.Projects.TimeSheet). 6 public procedures, 4 events, 12 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: 0850078dbfa221adfe8bfd7ce8d01c0fef19956d5d9b0c628dda379ff222c0b7
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/Projects/Timesheet/ServTimesheetMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Service/Projects/Timesheet/ServTimesheetMgt.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: 6451
name: Serv. Time Sheet Mgt.
namespace: Microsoft.Projects.TimeSheet
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: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 26
  events: 4
  subscribers: 12
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 2
  implements: 0
---

# Codeunit 6451 "Serv. Time Sheet Mgt."

> Codeunit 6451 "Serv. Time Sheet Mgt." in Base Application (Microsoft.Projects.TimeSheet). 6 public procedures, 4 events, 12 event subscribers. Introduced in BC25, still in BC30, changed in BC28.

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

## Events published

- `OnBeforeAddServLinesFromTSDetail(ServiceHeader: Record Microsoft.Service.Document."Service Header"; var TimeSheetDetail: Record "Time Sheet Detail"; LineNo: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateTSLineFromServiceShptLine(var ServiceShipmentLine: Record Microsoft.Service.History."Service Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateTSLineFromServiceLine(var ServiceLine: Record Microsoft.Service.Document."Service Line"; var IsHandled: Boolean)` (integration)
- `OnAddServLinesFromTSDetailOnBeforeInsertServiceLine(var ServiceLine: Record Microsoft.Service.Document."Service Line"; var LineNo: Integer; ServiceHeader: Record Microsoft.Service.Document."Service Header"; TimeSheetDetail: Record "Time Sheet Detail")` (integration)

## Event subscriptions

- OnAfterCopyFromTimeSheetLine subscribes to Table "Time Sheet Detail" OnAfterCopyFromTimeSheetLine
- OnValidateTypeOnAfterClearFields subscribes to Table "Time Sheet Line" OnValidateTypeOnAfterClearFields
- OnLookupActivity subscribes to Page "Activity Details FactBox" OnLookupActivity
- OnReopenApprovedOnBeforeCheckLinkedDoc subscribes to Codeunit "Time Sheet Approval Management" OnReopenApprovedOnBeforeCheckLinkedDoc
- OnAfterApprove subscribes to Codeunit "Time Sheet Approval Management" OnAfterApprove
- OnBeforeCheckTimeSheetLineFieldsVisible subscribes to Codeunit "Time Sheet Management" OnBeforeCheckTimeSheetLineFieldsVisible
- OnCreateTSLineFromDocLineOnBeforeTimeSheetLineInsert subscribes to Codeunit "Time Sheet Management" OnCreateTSLineFromDocLineOnBeforeTimeSheetLineInsert
- OnGetActivityInfoCaseTypeElse subscribes to Codeunit "Time Sheet Management" OnGetActivityInfoCaseTypeElse
- OnBeforeShowLineDetails subscribes to Table "Time Sheet Line" OnBeforeShowLineDetails
- TimeSheetLineOnAfterSetExclusionTypeFilter subscribes to Table "Time Sheet Line" OnAfterSetExclusionTypeFilter
- TimeSheetLineArchiveOnAfterSetExclusionTypeFilter subscribes to Table "Time Sheet Line Archive" OnAfterSetExclusionTypeFilter
- OnSubmitOnAfterCheck subscribes to Codeunit "Time Sheet Approval Management" OnSubmitOnAfterCheck

## Procedures

- `CreateServDocLinesFromTS(ServiceHeader: Record "Service Header")`
- `CreateServDocLinesFromTSLine(ServiceHeader: Record "Service Header"; var TimeSheetLine: Record "Time Sheet Line")`
- `CreateTSLineFromServiceLine(ServiceLine: Record "Service Line"; DocumentNo: Code[20]; Chargeable: Boolean)`
- `CreateTSLineFromServiceShptLine(ServiceShipmentLine: Record "Service Shipment Line")`
- `CheckServiceLine(ServiceLine: Record "Service Line")`
- `CreateServLinesFromTS(ServiceHeader: Record "Service Header"; var TimeSheetLine: Record "Time Sheet Line"; AddBySelectedTimesheetLine: Boolean)`

Plus 4 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 950 "Time Sheet Management"](../codeunit/950.md) (3 calls: `CheckServiceLine → CheckTSLineDetailPosting`, `CreateTSLineFromServiceLine → CreateTSLineFromDocLine`, `CreateTSLineFromServiceShptLine → CreateTSLineFromDocLine`)

## Called by

- [Codeunit 5987 "Serv-Posting Journals Mgt."](../codeunit/5987.md) (4 calls: `PostResJnlLineConsume → CheckServiceLine`, `PostResJnlLineConsume → CreateTSLineFromServiceLine`, `PostResJnlLineShip → CheckServiceLine`, …)
- [Codeunit 5818 "Undo Service Shipment Line"](../codeunit/5818.md) (1 call: `PostResJnlLine → CreateTSLineFromServiceShptLine`)

## Across versions

- Present in: BC25-30
- Changed (declaration) in: 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: "codeunit", object_name: "Serv. Time Sheet Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
