---
id: change/bcapps/9778
type: change
title: "#9778 [Extensibility Request] issue 30362: add OnPostDocumentLinesOnBeforeInsertPostedHeaders event to Service-Post"
summary: A new integration event OnPostDocumentLinesOnBeforeInsertPostedHeaders enables extensions to control which posted service document is created during service posting, matching the extensibility available in Sales-Post.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit service-post
system: service
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:06:45.030Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: f75f2389b60448e4d97bd579f49e9addc3130569
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9778
    title: "microsoft/BCApps#9778: [Extensibility Request] issue 30362: add OnPostDocumentLinesOnBeforeInsertPostedHeaders event to Service-Post"
    date: "2026-09-01"
    commit: f75f2389b60448e4d97bd579f49e9addc3130569
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/5980
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9778
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9778
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-01T21:48:48Z"
author: AleksandricMarko
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
  - event-request
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 3
  additions: 51
  deletions: 24
  al: 3
apps:
  - Base Application
objects_touched:
  - key: codeunit/5980
    page: codeunit/5980
    type: codeunit
    id: 5980
    name: Service-Post
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/NA/BaseApp/Service/Posting/ServicePost.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 643301
systems:
  - service
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9778 [Extensibility Request] issue 30362: add OnPostDocumentLinesOnBeforeInsertPostedHeaders event to Service-Post

> A new integration event OnPostDocumentLinesOnBeforeInsertPostedHeaders enables extensions to control which posted service document is created during service posting, matching the extensibility available in Sales-Post.

[Pull request](https://github.com/microsoft/BCApps/pull/9778) · merged into `main` (BC30) on 2026-09-01 by AleksandricMarko · 3 files (+51 -24), 3 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New IsHandled integration event added to Service-Post codeunit
- Raised in PostDocumentLines before posted service invoice or credit memo header creation
- Allows extensions to replace the standard decision on which posted document type to create
- Brings Service-Post extensibility feature parity with Sales-Post
- Change propagated across W1, NA, and IT layers

## AL objects touched

- [Codeunit 5980 "Service-Post"](../../objects/codeunit/5980.md), Base Application: modified
- `src/Layers/NA/BaseApp/Service/Posting/ServicePost.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#643301
- Labels: Team: SCM, event-request
- Systems: service

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
