---
id: object/codeunit/99000789
type: object
title: Codeunit 99000789 "Mfg. Purchase Document Mgt."
summary: Codeunit 99000789 "Mfg. Purchase Document Mgt." in Base Application (Microsoft.Manufacturing.Integration). 21 event subscribers. Introduced in BC26, still in BC30, changed in BC27.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: "26"
  last_changed: "27"
  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: 0091568a225200157086537564703d0a6929dabb7784d32ddbde890207f018b3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Manufacturing/Purchases/Document/MfgPurchaseDocumentMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Manufacturing/Purchases/Document/MfgPurchaseDocumentMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11368
    - change/bcapps/11320
object_type: codeunit
object_id: 99000789
name: Mfg. Purchase Document Mgt.
namespace: Microsoft.Manufacturing.Integration
app: Base Application
extends: null
first_version: "26"
last_version: "30"
present_in:
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 21
  events: 0
  subscribers: 21
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 0
  implements: 0
---

# Codeunit 99000789 "Mfg. Purchase Document Mgt."

> Codeunit 99000789 "Mfg. Purchase Document Mgt." in Base Application (Microsoft.Manufacturing.Integration). 21 event subscribers. Introduced in BC26, still in BC30, changed in BC27.

Base Application · Microsoft.Manufacturing.Integration · BC26-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Manufacturing/Purchases/Document/MfgPurchaseDocumentMgt.Codeunit.al) · facts from BC29

## Event subscriptions

- OnAfterInitPurchaseLineDefaultDimSource subscribes to Table "Purchase Header" OnAfterInitPurchaseLineDefaultDimSource
- OnTransferSavedFieldsOnAfterSetVariantCode subscribes to Table "Purchase Header" OnTransferSavedFieldsOnAfterSetVariantCode
- OnAfterTransferSavedFields subscribes to Table "Purchase Header" OnAfterTransferSavedFields
- OnInsertTempPurchLineInBufferOnBeforeTempPurchLineInsert subscribes to Table "Purchase Header" OnInsertTempPurchLineInBufferOnBeforeTempPurchLineInsert
- OnCollectParamsInBufferForCreateDimSetOnAfterSetTempPurchLineFilters subscribes to Table "Purchase Header" OnCollectParamsInBufferForCreateDimSetOnAfterSetTempPurchLineFilters
- OnAfterInitDefaultDimensionSources subscribes to Table "Purchase Line" OnAfterInitDefaultDimensionSources
- OnIsProdOrder subscribes to Table "Purchase Line" OnIsProdOrder
- OnIsWorkCenter subscribes to Table "Purchase Line" OnIsWorkCenter
- OnIsSubcontractingCreditMemo subscribes to Table "Purchase Line" OnIsSubcontractingCreditMemo
- OnOpenItemTrackingLinesOnAfterCheck subscribes to Table "Purchase Line" OnOpenItemTrackingLinesOnAfterCheck
- OnAfterCheckAssosiatedProdOrder subscribes to Table "Purchase Line" OnAfterCheckAssosiatedProdOrder
- OnTestProdOrderNo subscribes to Table "Purchase Line" OnTestProdOrderNo
- OnTestWorkCenterNo subscribes to Table "Purchase Line" OnTestWorkCenterNo
- OnGetItemLedgEntryOnShouldExit subscribes to Table "Purch. Inv. Line" OnGetItemLedgEntryOnShouldExit
- PurchInvLineOnIsProdOrder subscribes to Table "Purch. Inv. Line" OnIsProdOrder
- PurchRcptLineOnIsProdOrder subscribes to Table "Purch. Rcpt. Line" OnIsProdOrder
- ReturnShipmentLineOnIsProdOrder subscribes to Table "Return Shipment Line" OnIsProdOrder
- PurchRcptLineOnTestWorkCenterNo subscribes to Table "Purch. Rcpt. Line" OnTestWorkCenterNo
- ReturnShipmentLineOnTestProdOrder subscribes to Table "Return Shipment Line" OnTestProdOrder
- OnCreateDimensionsOnAfterAddDimSources subscribes to Codeunit "Purchase-Post Prepayments" OnCreateDimensionsOnAfterAddDimSources
- OnBeforeCheckDimValuePostingLine subscribes to Report "Purchase Document - Test" OnBeforeCheckDimValuePostingLine

## 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 408 "DimensionManagement"](../codeunit/408.md) (3 calls: `OnAfterInitDefaultDimensionSources → AddDimSource`, `OnAfterInitPurchaseLineDefaultDimSource → AddDimSource`, `OnCreateDimensionsOnAfterAddDimSources → AddDimSource`)

## Recent changes

- 2026-09-28 [#11368 [29.X]-[Subcontracting] Purchase Return Order cannot be posted for subcontracting, while Corrective Credit Memo works well](../../changes/bcapps/11368.md) (releases/29.x, BC29, fix)
- 2026-09-14 [#11320 [Master]-[Subcontracting] Purchase Return Order cannot be posted for subcontracting, while Corrective Credit Memo works well](../../changes/bcapps/11320.md) (main, BC30, fix)

## Across versions

- Present in: BC26-30
- Changed (declaration) in: BC27

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