[Main]- Error The Bin Content does not exist.Not able to post an Inventory Pick for Assemble to Order#9297
Conversation
Copilot PR ReviewIteration 3 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@186d8a131465475c79244d994acb872cd5c0d4bf Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 3 knowledge-backed · 0 agent findings. Orchestrator pre-filter (2 file(s) excluded)
Findings produced by the AL review agent v1.7.3. Reply 👎 on any inline comment to flag false positives. |
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR changes The direction is correct. Other warehouse code already treats ATO inventory pick lines differently, and the later posting path still checks the warehouse journal line after SuggestionsS1 - Remove the first-line ATO exit Risk assessment and necessityRisk: This is warehouse posting logic for inventory picks, item tracking, bin content, and ATO assembly output. The change is narrow and does not change public APIs or events, but the remaining line-order dependency can bypass the intended pre-post validation for non-ATO lines before source document posting. BCApps is single-layer, so there is no country-layer ripple. Necessity: The bug is valid and important. Without a fix, users can be blocked from posting an Inventory Pick for an ATO sales order on a new bin-mandatory location because the ATO output bin content is not available until assembly posting creates it. The scope is right, but the implementation should make the skip per-line only.
|
|
qasimikram
left a comment
There was a problem hiding this comment.
Review
S1 - Remove the first-line ATO exit
CheckQuantityInBinContentForTracking still exits before scanning the activity lines when the current first line's item is Assemble-to-Order. This leaves the new per-line skip dependent on line order: if the ATO sales line is first, the procedure returns and normal tracked lines never receive the bin-content validation.
Please remove the procedure-level ATO exit and rely on WarehouseActivityLine2."Assemble to Order" inside the loop. Add or reorder a regression test so the ATO line precedes the normal tracked line and verify that the normal line is still validated.
This is blocking because warehouse posting can bypass validation for non-ATO tracked lines based only on document line order.
Updated the same. |
qasimikram
left a comment
There was a problem hiding this comment.
Review
S1 - Evaluate Order Tracking Policy per line
CheckQuantityInBinContentForTracking still reads WarehouseActivityLine."Item No." before iterating and exits when that first item's Order Tracking Policy is None. For a mixed Inventory Pick where the first line is untracked and a later non-ATO line uses Tracking & Action Msg., the later line never receives the bin-content validation. This preserves the same line-order dependency that the ATO change is intended to remove.
Please move the policy check into the per-line loop (or otherwise evaluate each line independently), alongside the per-line ATO condition.
S2 - Make the ATO-first test detect the old behavior
InvtPickForATOLineBeforeNormalItemStillValidatesNormalLine only verifies that posting succeeds and that a warehouse entry exists. The pre-change implementation also exits early and then posts the normal line, so this test would pass before the fix and does not prove that the normal line's pre-post bin-content validation ran.
Please make the normal line fail specifically when that validation executes, or add another observable assertion that distinguishes the validation path from ordinary successful posting.
This is blocking because warehouse posting validation remains dependent on document line order, and the added test does not protect the corrected line-order behavior.
Workitem-Bug 640983: [ALL-E] Error: "The Bin Content does not exist...." Not able to post an Inventory Pick for Assemble to Order items
Fixes AB#642202
Issue: "The Bin Content does not exist...." Not able to post an Inventory Pick for Assemble to Order items
Cause: CheckQuantityInBinContentForTracking iterates all pick lines and calls WMSMgt.CheckWhseJnlLine (which validates existing bin content) on ATO lines — even though ATO output bin content is only created during assembly posting, not before the pick.
Solution: Skip ATO pick lines (if not WarehouseActivityLine2."Assemble to Order") in the bin-content validation loop