[master] Transfer Order header deletion blocked by reserved quantity — inconsistent with line deletion and all other document types#9705
Draft
neeleshsinghal wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a BaseApp deletion inconsistency where deleting a Transfer Order header could be blocked by reserved quantities, even though line deletion (and other document types) clear reservations as part of deletion. The change aligns Transfer Line deletion behavior to always clear reservations first, and adds regression tests covering both header- and line-deletion paths.
Changes:
- Update
Transfer LinetableOnDeletelogic to delete reservation data first, then validate reserved quantities are zero. - Add new SCM reservation regression tests validating Transfer Order header deletion succeeds with reserved outbound lines and clears reservations.
- Apply the same BaseApp
Transfer Linedeletion fix across W1/NA/RU/IT layer implementations.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Layers/W1/Tests/SCM/SCMTransferReservation.Codeunit.al | Adds regression tests for deleting reserved transfer headers/lines and reservation cleanup. |
| src/Layers/W1/BaseApp/Inventory/Transfer/TransferLine.Table.al | Moves reserved-quantity validation to after TransferLineReserve.DeleteLine(Rec) in OnDelete. |
| src/Layers/RU/BaseApp/Inventory/Transfer/TransferLine.Table.al | Same OnDelete reservation/validation reordering as W1. |
| src/Layers/NA/BaseApp/Inventory/Transfer/TransferLine.Table.al | Same OnDelete reservation/validation reordering as W1. |
| src/Layers/IT/BaseApp/Inventory/Transfer/TransferLine.Table.al | Same OnDelete reservation/validation reordering as W1 (and remove unintended BOM). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
neeleshsinghal
requested review from
a team,
alexei-dobriansky,
qasimikram and
v-ankitgoyal
July 24, 2026 05:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workitem : Bug 643376: [master] [ALL-E] Transfer Order header deletion blocked by reserved quantity — inconsistent with line deletion and all other document types
Fixes AB#643376