Warehouse Integration

Prev Next

Feature Overview

Warehouse Integration describes how the Purchase Container Handling app interacts with Business Central's warehouse management functionality. The key principle is straightforward: when a purchase order line or transfer order line is assigned a container code and that line belongs to a location that requires warehouse documents (the location has "Require Receive" enabled), posting must happen from the warehouse receipt document — not from the container card. The container card's Receive Lines action will detect this situation and block the posting, showing a message that explains which order and line must be handled through warehouse documents.

The container code travels with the line throughout the warehouse process. When a warehouse receipt is created from a purchase order or transfer order, the container code is copied from the source line onto the warehouse receipt line. This means the receiving warehouse clerk can see which container each line belongs to, even when working from the warehouse receipt rather than the container card. On the warehouse receipt, there is also an Add Container Code To All Lines action that lets users stamp a container code onto all lines in the receipt at once — useful when all lines in a receipt belong to the same container.

After posting from the warehouse, the container code is stamped on the resulting Purchase Receipt lines and Transfer Receipt lines, and from there it flows to Item Ledger Entries. This preserves full traceability from the container all the way to inventory movements, regardless of whether posting happened from the container card or from warehouse documents.

The container code can also be filtered in warehouse source document selection. When creating warehouse receipts from source documents, you can filter purchase lines by container code using the Container ID Filter field on the Warehouse Source Filter, which allows you to create a warehouse receipt that contains exactly the lines belonging to a specific container.

Key Facts

Topic Detail
Relevant pages Warehouse Receipt, Warehouse Source Filter
Container code on Warehouse Receipt lines Copied automatically from the purchase/transfer source line
Add Container Code To All Lines action Available on Warehouse Receipt header; stamps all receipt lines with the selected container
Posting restriction Locations with Require Receive enabled must be posted from warehouse documents, not from the container card
Container code after warehouse posting Stamped on Posted Purchase Receipt lines and Transfer Receipt lines
Item Ledger traceability Container code flows to Item Ledger Entries at posting
Source document filter Container ID Filter on Warehouse Source Filter lets you pull only lines from a specific container

Getting Started

  1. Assign a container code to purchase order lines or transfer order lines as described in the Inbound Container article.
  2. If the destination location has Require Receive enabled, do not post from the container card. Instead, proceed to create a warehouse receipt.
  3. Open the Warehouse Receipt for the relevant location. If the receipt does not yet exist, create it from the source documents.
  4. On the warehouse receipt lines, verify that the Container Code column shows the correct container code — it should have been copied automatically from the purchase/transfer lines.
  5. If lines are missing the container code, use the Add Container Code To All Lines action on the receipt header to stamp all lines with the correct container.
  6. Post the warehouse receipt as normal.
  7. Return to the Inbound Container Card. The posted lines now appear in the Posted Container Lines sub-list.
  8. If all lines have been received, manually set the container status to Posted, or use Receive Lines — if no open lines remain on non-warehouse locations, this is a no-op.

Related Features

Warehouse Integration is an extension of the Inbound Container feature — the container code that drives warehouse behaviour is always created and managed on the Inbound Container card. Container Measurements and Value is also relevant here: receipt weight and volume fields on posted container lines reflect what was received, whether posting happened from the container card or from a warehouse receipt. Item Ledger traceability (the container code on Item Ledger Entries) works the same way regardless of the posting path.


User Stories

US-01: Understand when to post from the container card vs. warehouse documents

As a Purchasing Agent
I want to know whether I should post a container from the container card or from a warehouse receipt
So that I choose the correct posting path and avoid errors

Setup:

  1. Open the Inbound Container Card and check the Location Code on the Open Container Lines.
  2. If the location has Require Receive enabled (a warehouse-managed location), posting must be done from the warehouse receipt — the container card's Receive Lines action will be blocked for those lines.
  3. If the location does not require warehouse documents (a simple location), you can post directly from the container card using Receive Lines.
  4. A container can have lines from both types of locations. The app will block if any line is on a warehouse-managed location.

Note: The error message from the app names the specific Purchase Order number and line that triggered the block, making it easy to identify which order needs to be handled in the warehouse.

US-02: Verify that the container code flows to warehouse receipt lines automatically

As a Purchasing Agent
I want to confirm that the container code from purchase order lines appears on warehouse receipt lines without manual entry
So that warehouse staff can see which container each receipt line belongs to

Setup:

  1. Assign a container code to a purchase order line (via the Container Code field on the purchase order subform or via the container card).
  2. Create a warehouse receipt from the purchase order using the standard Get Source Documents flow.
  3. Open the warehouse receipt lines.
  4. The Container Code column on the receipt line shows the container code copied from the purchase line.

Note: The same applies to transfer order lines — the Inbound Container Code on the transfer line is copied to the warehouse receipt line when the receipt is created.

US-03: Stamp a container code on all lines of a warehouse receipt

As a Purchasing Agent
I want to add a container code to all lines of an existing warehouse receipt at once
So that I can associate an entire receipt with a container even if the lines did not have a container code when the receipt was created

Setup:

  1. Open the relevant Warehouse Receipt.
  2. In the Functions menu, click Add Container Code To All Lines.
  3. A lookup window opens showing available inbound containers.
  4. Select the container and confirm.
  5. The Container Code field is set on all warehouse receipt lines.
US-04: Filter warehouse source documents by container code when creating a receipt

As a Purchasing Agent
I want to create a warehouse receipt that contains only the purchase lines belonging to a specific container
So that the receipt corresponds exactly to the container being unloaded

Setup:

  1. Open the Warehouse Receipt creation flow and navigate to the source document filter.
  2. In the Warehouse Source Filter, find the Container ID Filter field.
  3. Enter the container code you want to filter by.
  4. Run the Get Source Documents action.
  5. Only purchase order lines with that container code are pulled into the receipt.
US-05: Confirm container code is preserved on posted purchase receipt lines after warehouse posting

As a Purchasing Agent
I want to verify that the container code is stamped on posted purchase receipt lines after posting from a warehouse receipt
So that the container is traceable on the posted document even though posting happened outside the container card

Setup:

  1. Post the warehouse receipt containing lines with a container code.
  2. Open the resulting Posted Purchase Receipt.
  3. On the subform, the Container Code column shows the container code on each line that had one.
  4. The container code is preserved from the source purchase line through the warehouse receipt to the posted receipt.
US-06: Confirm container code flows to Item Ledger Entries after warehouse posting

As a Purchasing Agent
I want to verify that Item Ledger Entries created by warehouse posting carry the container code
So that inventory movements can be traced back to a specific container regardless of the posting path

Setup:

  1. After posting from a warehouse receipt where container codes are set, open Item Ledger Entries.
  2. Filter by the relevant item and date.
  3. The Inbound Container Code column shows the container code on entries that originated from lines with a container code.

Note: The container code is copied from the purchase line to the item journal line during the posting process (via the OnAfterCopyItemJnlLineFromPurchLine event) and then transferred to the Item Ledger Entry. This chain works the same whether posting originates from the container card or from a warehouse receipt.

US-07: Handle a container with lines across both warehouse and non-warehouse locations

As a Purchasing Agent
I want to understand how to process a container where some lines go to a warehouse-managed location and others go to a simple location
So that I can complete the container processing without errors

Setup:

  1. Open the Inbound Container Card for a container with mixed location types.
  2. Attempt to click Receive Lines — the app will block if any line is on a warehouse location and show the relevant purchase order and line number.
  3. Go to the warehouse and post the warehouse receipt for the lines on the warehouse location.
  4. Return to the Inbound Container Card — the warehouse-posted lines now appear in the Posted Container Lines sub-list.
  5. The remaining open lines (on non-warehouse locations) are still in the Open Container Lines sub-list.
  6. Click Receive Lines again — this time only non-warehouse lines remain open, and the posting proceeds without error.
US-08: Track the container code on transfer receipt lines after warehouse posting

As a Purchasing Agent
I want to confirm that transfer receipt lines created from a warehouse posting carry the container code
So that inter-location transfers processed through the warehouse are traceable to their container

Setup:

  1. Assign an inbound container code to a transfer order line.
  2. Create and post a warehouse receipt for the transfer.
  3. The resulting Transfer Receipt line carries the container code from the transfer line (copied via the OnBeforeInsertTransRcptLine event).
  4. The container line appears in the Posted Container Lines sub-list on the container card.

Field Reference

Warehouse Receipt Lines

Field Where to find it What it does Default
Container Code Warehouse Receipt Lines The inbound container code associated with this receipt line; copied from the source purchase or transfer line From source line

Warehouse Source Filter

Field Where to find it What it does Default
Container ID Filter Warehouse Source Filter Filters purchase order lines by container code when pulling source documents into a warehouse receipt Blank

Posted Purchase Receipt Lines

Field Where to find it What it does Default
Container Code Posted Purchase Rcpt. Subform The container code preserved from the purchase order line at posting From source line
Ship-to Code Posted Purchase Rcpt. Subform The ship-to code from the purchase line at posting From source line

Item Ledger Entries

Field Where to find it What it does Default
Inbound Container Code Item Ledger Entries The container code stamped on the entry at posting; enables traceability from inventory movements back to the original container From purchase line