📘 Introduction
In Microsoft Dynamics 365 Finance and Operations (D365FO), understanding how Sales and Purchase Orders flow through the system is vital for developers, functional consultants, and power users. This guide dives deep into the underlying tables and classes involved in creating, posting, and managing sales and purchase orders — updated for D365FO and free of legacy AX references.
🛒 Sales Order: Tables & Classes in D365FO
📌 Core Classes for Sales Order Lifecycle
- SalesDocumentHeaderType and SalesDocumentLineType: Used while initializing sales order headers and lines.
- SalesPosting_Confirm: Handles order confirmation posting.
- SalesPosting_PackingSlip: Executes packing slip generation.
- SalesPosting_Invoice: Triggers invoice generation against sales orders.
- SalesPosting_PickingList: Prepares the picking list for warehouse processing.
📊 Primary Sales Order Tables
Table Name | Description |
---|---|
SalesOrderHeader | Stores sales order header data for all statuses. |
SalesOrderLine | Line details for each sales order. |
SalesPostHeaderBuffer | Temporary header info during posting operations. |
SalesPostLineBuffer | Temporary line info during posting operations. |
SalesConfirmHeader | Posted confirmation header details. |
SalesConfirmLine | Line-level data for posted confirmations. |
SalesPackingSlipHeader | Header data for posted packing slips. |
SalesPackingSlipLine | Line items related to packing slips. |
SalesInvoiceHeader | Stores posted invoice headers. |
SalesInvoiceLine | Contains invoice line data. |
📦 Purchase Order: Tables & Classes in D365FO
🧩 Key Classes for Purchase Order Lifecycle
- PurchOrderHeaderType and PurchOrderLineType: Used during PO creation.
- PurchPosting_Confirmation: Manages confirmation posts.
- PurchPosting_PackingSlip: Facilitates packing slip posts.
- PurchPosting_Invoice: Processes purchase invoices.
- PurchPosting_ReceiptList: Generates receipts list.
- PurchPosting_ApproveJournal: Used in PO approval workflows.
📊 Key Purchase Order Tables
Table Name | Description |
---|---|
PurchaseOrderHeader | Stores purchase order headers. |
PurchaseOrderLine | Line-level information for POs. |
PurchasePostHeaderBuffer | Temporary header table for posting. |
PurchasePostLineBuffer | Line buffer during PO posting. |
PurchaseConfirmationHeader | Confirmed purchase order headers. |
PurchaseConfirmationLine | Confirmation line items. |
PurchaseReceiptHeader | Header info for received goods. |
PurchaseReceiptLine | Posted receipt line items. |
PurchaseReceiptRelation | Links receipts with original POs. |
PurchasePackingSlipHeader | Posted packing slip headers. |
PurchasePackingSlipLine | Line items for PO packing slips. |
PurchaseInvoiceHeader | Posted invoice headers. |
PurchaseInvoiceLine | Lines for invoiced purchase orders. |
PurchaseInvoiceStaging | Staging table for vendor invoice import. |
⚙️ Algorithmic Flow (Conceptual)
🧮 Sales Order Posting Algorithm
1. Initialize Sales Order using SalesDocumentHeaderType and SalesDocumentLineType. 2. Based on selected action: a. Post confirmation using SalesPosting_Confirm. b. Generate packing slip via SalesPosting_PackingSlip. c. Generate invoice using SalesPosting_Invoice. 3. Data flows through temporary buffers → permanent journal tables.
🧮 Purchase Order Posting Algorithm
1. Create PO using PurchOrderHeaderType and PurchOrderLineType. 2. Perform one of the following actions: a. Confirm PO via PurchPosting_Confirmation. b. Post receipts using PurchPosting_ReceiptList and PurchPosting_PackingSlip. c. Invoice PO using PurchPosting_Invoice. 3. Temporary buffers write to journal tables like PurchaseInvoiceHeader.
📝 Conclusion
Understanding the internal architecture of D365FO’s sales and purchase workflows — from document creation to posting — is essential for any developer or consultant working with the platform. With this knowledge, you can extend functionality, troubleshoot posting issues, and design advanced customizations with confidence.
0 Comments