(Bug 635844): [Subcontracting] SubcTransferLine "Work Center No." OnValidate overwrites Gen. Prod. Posting Group — dead code that is potentially dangerous#8283
Open
alexei-dobriansky wants to merge 1 commit into
Conversation
Contributor
Gen. Prod. Posting Group no longer auto-populatedRemoving the OnValidate trigger on 'Subc. Work Center No.' means that when a user sets or changes the work center on a subcontracting transfer line, 'Gen. Prod. Posting Group' will no longer be automatically copied from the Work Center record. This breaks the previously established behavior and can leave transfer lines with an empty or stale posting group, potentially causing posting errors or incorrect G/L account assignments at the time of transfer posting. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
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.
Summary
Removes a dormant
OnValidatetrigger on"Subc. Work Center No."(field 99001537) inSubcTransferLine.TableExt.althat would silently overwrite the transfer line's"Gen. Prod. Posting Group"with the Work Center's posting group if ever invoked viaValidate(...).Problem
The trigger:
:=, neverValidate(...), and the page field isEditable = false/Visible = false."Gen. Prod. Posting Group"is correctly populated from the Item card viaValidate("Item No.")in BaseApp'sTransferLine. The first caller who writesValidate("Subc. Work Center No.", ...)would silently replace the Item's posting group with the Work Center's, producing wrong G/L entries on transfer posting with no error."Subc. Work Center No."on the transfer line is purely informational/traceability — it is propagated as-is into posted shipment/receipt/direct-transfer lines and intoSubcontractorWIPLedgerEntry, but never participates in calculations, filtering on transfer lines, or G/L posting logic.Fix
Delete the body of the
OnValidatetrigger. The field definition (caption, table relation, tooltip) is unchanged.Verification
"Subc. Work Center No."acrossApp/andTest/: every write uses:=; noValidate("Subc. Work Center No.", ...)exists anywhere.SubcTransOrderSub.PageExt.alisEditable = falseandVisible = false— no UI trigger path.Risk
Minimal. The trigger never executes today, so behavior on existing flows is unchanged. The change eliminates a future correctness risk for G/L posting.
Fixes AB#635844