---
id: object/codeunit/900
type: object
title: Codeunit 900 "Assembly-Post"
summary: Codeunit 900 "Assembly-Post" in Base Application (Microsoft.Assembly.Posting). 11 public procedures, 50 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC24, BC26-28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  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: 309984b3034b43248cc27f16335e5bc535867648df72d41cd4495687e084160c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Assembly/Posting/AssemblyPost.Codeunit.al
    title: src/Layers/W1/BaseApp/Assembly/Posting/AssemblyPost.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: 900
name: Assembly-Post
namespace: Microsoft.Assembly.Posting
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 117
  events: 50
  subscribers: 2
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 12
  calls: 25
  called_by: 6
  implements: 0
---

# Codeunit 900 "Assembly-Post"

> Codeunit 900 "Assembly-Post" in Base Application (Microsoft.Assembly.Posting). 11 public procedures, 50 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC24, BC26-28.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Assembly Header |
| Permissions | TableData "Posted Assembly Header" = rim, TableData "Posted Assembly Line" = rim, TableData "Item Entry Relation" = ri, TableData "G/L Entry" = r |

## Events published

- `OnAfterCreateItemJnlLineFromAssemblyHeader(var ItemJournalLine: Record "Item Journal Line"; AssemblyHeader: Record "Assembly Header")` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnAfterCreateItemJnlLineFromAssemblyHeader
- `OnAfterCreateItemJnlLineFromAssemblyLine(var ItemJournalLine: Record "Item Journal Line"; AssemblyLine: Record "Assembly Line")` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnAfterCreateItemJnlLineFromAssemblyLine
- `OnAfterCreateResJnlLineFromItemJnlLine(var ResJournalLine: Record "Res. Journal Line"; ItemJournalLine: Record "Item Journal Line"; AssemblyLine: Record "Assembly Line")` (integration)
- `OnAfterCreateWhseJnlLineFromItemJnlLine(var WarehouseJournalLine: Record "Warehouse Journal Line"; ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnAfterDeleteAssemblyDocument(var AssemblyHeader: Record "Assembly Header")` (integration)
- `OnAfterFinalizePost(var AssemblyHeader: Record "Assembly Header")` (integration)
- `OnAfterInitPost(var AssemblyHeader: Record "Assembly Header"; SuppressCommit: Boolean)` (integration)
- `OnAfterOnRun(var AssemblyHeader: Record "Assembly Header"; SuppressCommit: Boolean)` (integration)
- `OnAfterPost(var AssemblyHeader: Record "Assembly Header"; var AssemblyLine: Record "Assembly Line"; PostedAssemblyHeader: Record "Posted Assembly Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var ResJnlPostLine: Codeunit "Res. Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line")` (integration)
  - subscribers: [Codeunit 1508 "Notification Lifecycle Handler"](../codeunit/1508.md) OnAfterAssemblyPost, [Codeunit 20412 "Qlty. Assembly Integration"](../codeunit/20412.md) HandleOnAfterPost
- `OnAfterPostedAssemblyLineInsert(var PostedAssemblyLine: Record "Posted Assembly Line"; AssemblyLine: Record "Assembly Line")` (integration)
- `OnAfterPostedAssemblyHeaderModify(var PostedAssemblyHeader: Record "Posted Assembly Header"; AssemblyHeader: Record "Assembly Header"; ItemLedgEntryNo: Integer)` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnAfterPostedAssemblyHeaderModify
- `OnAfterRecreateAsmOrderWithUndo(var PostedAssemblyHeader: Record "Posted Assembly Header"; var AssemblyHeader: Record "Assembly Header")` (integration)
- `OnAfterValidatePostingDate(var AssemblyHeader: Record "Assembly Header"; PostingDateExists: Boolean; ReplacePostingDate: Boolean)` (integration)
- `OnAfterUndoInitPost(var PostedAssemblyHeader: Record "Posted Assembly Header"; var PostingDate: Date)` (integration)
- `OnAfterUndoPost(var PostedAssemblyHeader: Record "Posted Assembly Header"; SuppressCommit: Boolean)` (integration)
- `OnAfterUpdateAsmOrderWithUndo(var PostedAssemblyHeader: Record "Posted Assembly Header"; var AssemblyHeader: Record "Assembly Header")` (integration)
- `OnBeforeAssemblyLineModify(var AssemblyLine: Record "Assembly Line"; QtyToConsumeBase: Decimal)` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnBeforeAssemblyLineModify
- `OnBeforeCheckWhseJnlLine(var WarehouseJournalLine: Record "Warehouse Journal Line"; ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeDeleteAssemblyDocument(AssemblyHeader: Record "Assembly Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeFinalizePost(var AssemblyHeader: Record "Assembly Header")` (integration)
- `OnBeforeInitPost(var AssemblyHeader: Record "Assembly Header"; SuppressCommit: Boolean; var GenJnlPostPreview: Codeunit "Gen. Jnl.-Post Preview"; var PostingDate: Date; PostingDateExists: Boolean; ReplacePostingDate: Boolean)` (integration)
- `OnBeforeOnRun(var AssemblyHeader: Record "Assembly Header"; SuppressCommit: Boolean)` (integration)
- `OnBeforePost(var AssemblyHeader: Record "Assembly Header")` (integration)
  - subscribers: [Codeunit 1508 "Notification Lifecycle Handler"](../codeunit/1508.md) OnBeforeAssemblyPost
- `OnBeforePostCorrectionItemJnLine(var ItemJournalLine: Record "Item Journal Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary)` (integration)
- `OnBeforePostItemConsumption(var AssemblyHeader: Record "Assembly Header"; var AssemblyLine: Record "Assembly Line"; var ItemJournalLine: Record "Item Journal Line")` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnBeforePostItemConsumption
- `OnBeforePostWhseJnlLine(AssemblyHeader: Record "Assembly Header"; ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; Location: Record Location; SourceCode: Code[10]; var IsHandled: Boolean)` (integration)
- `OnBeforePostedAssemblyLineInsert(var PostedAssemblyLine: Record "Posted Assembly Line"; AssemblyLine: Record "Assembly Line")` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnAfterPostedAssemblyLineInsert
- `OnBeforePostItemConsumptionProcedure(AssemblyHeader: Record "Assembly Header"; var AssemblyLine: Record "Assembly Line"; PostingNoSeries: Code[20]; QtyToConsume: Decimal; QtyToConsumeBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; DocumentNo: Code[20]; IsCorrection: Boolean; ApplyToEntryNo: Integer; var Result: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforePostItemOutputProcedure(AssemblyHeader: Record "Assembly Header"; PostingNoSeries: Code[20]; QtyToOutput: Decimal; QtyToOutputBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; DocumentNo: Code[20]; IsCorrection: Boolean; ApplyToEntryNo: Integer; var Result: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeRecreatedAsmHeaderInsert(var AssemblyHeader: Record "Assembly Header"; PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
- `OnDeleteAssemblyDocumentOnBeforeDeleteAssemblyHeader(var AssemblyHeader: Record "Assembly Header"; var AssemblyLine: Record "Assembly Line")` (integration)
- `OnDeleteAssemblyDocumentOnAfterDeleteAssemblyHeader(var AssemblyHeader: Record "Assembly Header"; var AssemblyLine: Record "Assembly Line")` (integration)
- `OnDeleteAssemblyDocumentOnBeforeDeleteAssemblyLines(var AssemblyHeader: Record "Assembly Header"; var AssemblyLine: Record "Assembly Line")` (integration)
- `OnInsertHeaderItemEntryRelationOnAfterInsertItemEntryRelation(var ItemEntryRelation: Record "Item Entry Relation"; var PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
- `OnPostHeaderOnAfterPostItemOutput(var AssemblyHeader: Record "Assembly Header"; var HeaderQty: Decimal; var HeaderQtyBase: Decimal)` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnPostHeaderOnAfterPostItemOutput
- `OnPostHeaderOnBeforePostItemOutput(var AssemblyHeader: Record "Assembly Header"; var HeaderQty: Decimal; var HeaderQtyBase: Decimal)` (integration)
- `OnPostItemConsumptionOnAfterPostItemJnlLine(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var AssemblyLine: Record "Assembly Line")` (integration)
- `OnPostOnAfterPostedAssemblyHeaderInsert(AssemblyHeader: Record "Assembly Header"; var PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
- `OnPostOnAfterCopyComments(AssemblyHeader: Record "Assembly Header"; PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
- `OnPostOnBeforePostedAssemblyHeaderInsert(AssemblyHeader: Record "Assembly Header"; var PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
- `OnPostLinesOnAfterGetLineQtys(var LineQty: Decimal; var LineQtyBase: Decimal; var AssemblyLine: Record "Assembly Line")` (integration)
- `OnPostLinesOnAfterAssemblyLineSetFilters(AssemblyHeader: Record "Assembly Header"; var AssemblyLine: Record "Assembly Line"; PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
- `OnPostWhseJnlLineOnBeforeGetWhseItemTrkgSetup(ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnUndoPostHeaderOnAfterTransferFields(var AssemblyHeader: Record "Assembly Header"; PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnUndoPostHeaderOnAfterTransferFields
- `OnUndoPostLinesOnAfterTransferFields(var AssemblyLine: Record "Assembly Line"; AssemblyHeader: Record "Assembly Header"; PostedAssemblyHeader: Record "Posted Assembly Header")` (integration)
  - subscribers: [Codeunit 6255 "Sust. Assembly Subscriber"](../codeunit/6255.md) OnUndoPostLinesOnAfterTransferFields
- `OnUndoPostLinesOnBeforeSortPostedLines(PostedAssemblyHeader: Record "Posted Assembly Header"; var PostedAssemblyLine: Record "Posted Assembly Line")` (integration)
- `OnBeforeRestoreItemTracking(var ItemLedgerEntry: Record "Item Ledger Entry"; OrderNo: Code[20]; OrderLineNo: Integer; SourceType: Integer; DocType: Option; RcptDate: Date; ShptDate: Date; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateWhseJnlLine(Location: Record Location; var WarehouseJournalLine: Record "Warehouse Journal Line"; AssemblyHeader: Record "Assembly Header"; ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckPossibleToUndo(PostedAssemblyHeader: Record "Posted Assembly Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeRestoreItemTrackingOnBeforeCreateSalesAssemblyReservationEntry(var ItemLedgerEntry: Record "Item Ledger Entry"; AssemblyHeader: Record "Assembly Header"; var ATOLink: Record "Assemble-to-Order Link"; var CreateReservEntry: Codeunit "Create Reserv. Entry"; var FromTrackingSpecification: Record "Tracking Specification"; var ReservStatus: Enum "Reservation Status"; var IsHandled: Boolean)` (integration)

## Event subscriptions

- OnBeforePostValueEntryToGL subscribes to Codeunit "Item Jnl.-Post Line" OnBeforePostValueEntryToGL
- OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem subscribes to Codeunit "Item Jnl.-Post Line" OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem

## Procedures

- `SetPostingDate(NewReplacePostingDate: Boolean; NewPostingDate: Date)`
- `SetSuppressCommit(NewSuppressCommit: Boolean)`
- `SetPreviewMode(NewPreviewMode: Boolean)`
- `Undo(var PostedAsmHeader: Record "Posted Assembly Header"; RecreateAsmOrder: Boolean)`
- `InitPostATO(var AssemblyHeader: Record "Assembly Header")`
- `PostATO(var AssemblyHeader: Record "Assembly Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var ResJnlPostLine: Codeunit "Res. Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line")`
- `FinalizePostATO(var AssemblyHeader: Record "Assembly Header")`
- `UndoInitPostATO(var PostedAsmHeader: Record "Posted Assembly Header")`
- `UndoPostATO(var PostedAsmHeader: Record "Posted Assembly Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var ResJnlPostLine: Codeunit "Res. Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line")`
- `UndoFinalizePostATO(var PostedAsmHeader: Record "Posted Assembly Header")`
- `UpdateBlanketATO(xBlanketOrderSalesLine: Record "Sales Line"; BlanketOrderSalesLine: Record "Sales Line")`

Plus 54 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 900 "Assembly Header"](../table/900.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 99000830 "Create Reserv. Entry"](../codeunit/99000830.md) (8 calls: `RestoreItemTracking → CreateEntry`, `RestoreItemTracking → CreateReservEntryFor`, `RestoreItemTracking → CreateReservEntryFrom`, …)
- [Codeunit 22 "Item Jnl.-Post Line"](../codeunit/22.md) (7 calls: `InsertHeaderItemEntryRelation → CollectItemEntryRelation`, `InsertLineItemEntryRelation → CollectItemEntryRelation`, `OnRun → PostDeferredValueEntriesToGL`, …)
- [Codeunit 408 "DimensionManagement"](../codeunit/408.md) (5 calls: `CheckDimComb → CheckDimIDComb`, `CheckDimComb → GetDimCombErr`, `CheckDimValuePosting → CheckDimValuePosting`, …)
- [Codeunit 5402 "Unit of Measure Management"](../codeunit/5402.md) (5 calls: `PostCorrectionItemJnLine → QtyRndPrecision`, `RecreateAsmOrderWithUndo → QtyRndPrecision`, `RoundQuantity → QtyRndPrecision`, …)
- [Codeunit 5817 "Undo Posting Management"](../codeunit/5817.md) (5 calls: `CheckPossibleToUndo → CheckItemLedgEntries`, `CheckPossibleToUndo → CollectItemLedgEntries`, `CheckPossibleToUndo → TestAsmHeader`, …)
- [Codeunit 926 "Assembly Line-Reserve"](../codeunit/926.md) (5 calls: `DeleteAssemblyDocument → DeleteLine`, `DeleteAssemblyDocument → SetDeleteItemTracking`, `PostItemConsumption → TransferAsmLineToItemJnlLine`, …)
- [Codeunit 6500 "Item Tracking Management"](../codeunit/6500.md) (4 calls: `PostCorrectionItemJnLine → ExistingExpirationDate`, `PostWhseJnlLine → GetWhseItemTrkgSetup`, `PostWhseJnlLine → SplitWhseJnlLine`, …)
- [Codeunit 7302 "WMS Management"](../codeunit/7302.md) (4 calls: `CheckWhseJnlLine → CheckWhseJnlLine`, `CreateWhseJnlLine → CalcCubageAndWeight`, `CreateWhseJnlLine → CheckAdjmtBin`, …)
- [Codeunit 925 "Assembly Header-Reserve"](../codeunit/925.md) (3 calls: `PostItemOutput → TransferAsmHeaderToItemJnlLine`, `PostItemOutput → UpdateItemTrackingAfterPosting`, `VerifyAsmHeaderReservAfterUndo → VerifyQuantity`)
- [Codeunit 1380 "Batch Processing Mgt."](../codeunit/1380.md) (2 calls: `ValidatePostingDate → GetBooleanParameter`, `ValidatePostingDate → GetDateParameter`)
- [Codeunit 19 "Gen. Jnl.-Post Preview"](../codeunit/19.md) (2 calls: `InitPost → IsActive`, `OnRun → ThrowError`)
- [Codeunit 11 "Gen. Jnl.-Check Line"](../codeunit/11.md) (1 call: `InitPost → DateNotAllowed`)
- [Codeunit 212 "Res. Jnl.-Post Line"](../codeunit/212.md) (1 call: `PostResourceConsumption → RunWithCheck`)
- [Codeunit 447 "Record Link Management"](../codeunit/447.md) (1 call: `Post → CopyLinks`)
- [Codeunit 5775 "Whse. Management"](../codeunit/5775.md) (1 call: `CreateWhseJnlLine → GetWhseJnlSourceDocument`)
- [Codeunit 5894 "Inventory Adjustment Handler"](../codeunit/5894.md) (1 call: `MakeInventoryAdjustment → MakeAutomaticInventoryAdjustment`)
- [Codeunit 6503 "Item Tracking Doc. Management"](../codeunit/6503.md) (1 call: `FindItemLedgerEntryAndWhseItemTrackingLine → RetrieveEntriesFromShptRcpt`)
- [Codeunit 7301 "Whse. Jnl.-Register Line"](../codeunit/7301.md) (1 call: `PostWhseJnlLine → (object)`)
- [Codeunit 903 "Release Assembly Document"](../codeunit/903.md) (1 call: `InitPost → (object)`)
- [Codeunit 904 "Whse.-Assembly Release"](../codeunit/904.md) (1 call: `PostHeader → Release`)
- [Codeunit 9070 "Document Errors Mgt."](../codeunit/9070.md) (1 call: `InitPost → GetNothingToPostErrorMsg`)
- [Codeunit 950 "Time Sheet Management"](../codeunit/950.md) (1 call: `PostResourceConsumption → CreateTSLineFromAssemblyLine`)
- [Codeunit 9500 "Sequence No. Mgt."](../codeunit/9500.md) (1 call: `OnRun → SetPreviewMode`)
- [Codeunit 99000832 "Sales Line-Reserve"](../codeunit/99000832.md) (1 call: `RestoreItemTracking → InitFromSalesLine`)
- [Page 456 "No. Series"](../page/456.md) (1 call: `InitPost → (object)`)

## Called by

- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (6 calls: `FinalizePostATO → FinalizePostATO`, `InitPostATO → InitPostATO`, `InitPostATO → SetPostingDate`, …)
- [Codeunit 5815 "Undo Sales Shipment Line"](../codeunit/5815.md) (4 calls: `UndoFinalizePostATO → UndoFinalizePostATO`, `UndoInitPostATO → UndoInitPostATO`, `UndoPostATO → UndoPostATO`, …)
- [Codeunit 901 "Assembly-Post (Yes/No)"](../codeunit/901.md) (4 calls: `Code → (object)`, `OnRunPreview → (object)`, `OnRunPreview → SetPreviewMode`, …)
- [Codeunit 1012 "Job Jnl.-Post Line"](../codeunit/1012.md) (3 calls: `PostATO → InitPostATO`, `PostATO → PostATO`, `PostATO → SetPostingDate`)
- [Codeunit 1013 "Job Jnl.-Post Batch"](../codeunit/1013.md) (1 call: `FinalizePostATO → FinalizePostATO`)
- [Codeunit 911 "Pstd. Assembly - Undo (Yes/No)"](../codeunit/911.md) (1 call: `Code → Undo`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC26-28

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