Bug 634267: [Subcontracting] Transfer Order Reopen not persisting from factbox drill-down (Bug 634267)#8170
Open
ChethanT wants to merge 2 commits into
Open
Bug 634267: [Subcontracting] Transfer Order Reopen not persisting from factbox drill-down (Bug 634267)#8170ChethanT wants to merge 2 commits into
ChethanT wants to merge 2 commits into
Conversation
…g 634267) ShowTransferOrdersAndReturnOrder passed a MarkedOnly-filtered record to PageManagement.PageRun/PageRunList. When the Transfer Order page opened bound to this marked record, actions like Reopen that modify Rec directly wrote to the marked record set rather than the real database, so changes were silently lost when the page closed. The fix uses a separate TransferHeaderToOpen record variable: - Single record: Get() fetches the real DB record before PageRun. - Multiple records: SelectionFilterManagement builds a No. filter applied to a clean record before PageRunList. Added test FactboxDrilldownTransferOrderReopenPersists that releases a transfer order, opens it via ShowTransferOrdersAndReturnOrder, performs Reopen in the page handler, and asserts the status persists as Open. AB#634267 Co-authored-by: Copilot <223556219+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.
Problem
When a Transfer Order is opened from the Subcontracting Details Factbox (e.g. clicking No. of Transfer Orders on a Purchase Order), actions like Reopen that modify
Recdirectly appear to succeed on screen but the change is silently lost when the page closes.Root Cause
ShowTransferOrdersAndReturnOrderinSubcPurchFactboxMgmtcollected Transfer Headers usingMark/MarkedOnlyand passed that marked record directly toPageManagement.PageRun/PageRunList. When the Transfer Order page opened bound to a marked record, operations that modifyRec(e.g. Reopen →Rec.Validate(Status, Open); Rec.Modify()) wrote to the marked record set in memory rather than the real database table. The change was discarded when the page closed.Actions like Post were unaffected because they call
TransferHeader.Get()internally on a separate variable, bypassingRec.Fix
Introduced a separate
TransferHeaderToOpenrecord variable that is populated from the real database:TransferHeaderToOpen.Get(TransferHeader.\"No.\")fetches the real DB record, thenPageManagement.PageRun(TransferHeaderToOpen).SelectionFilterManagement.GetSelectionFilterForTransferHeaderto build a "No." filter from the marked set, applies it toTransferHeaderToOpen, thenPageManagement.PageRunList(TransferHeaderToOpen).Test
Added
FactboxDrilldownTransferOrderReopenPersists:ShowTransferOrdersAndReturnOrder(the factbox drill-down path)AB#634267