Skip to content

Bug 637264: Reset posting codeunits transaction state after Commit in cost adjustment#8944

Open
alexei-dobriansky wants to merge 3 commits into
mainfrom
bugs/637264-ResetPostingCUsStateAfterCommitInCostAdjmt
Open

Bug 637264: Reset posting codeunits transaction state after Commit in cost adjustment#8944
alexei-dobriansky wants to merge 3 commits into
mainfrom
bugs/637264-ResetPostingCUsStateAfterCommitInCostAdjmt

Conversation

@alexei-dobriansky

@alexei-dobriansky alexei-dobriansky commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes AB#637264

Problem

During item-by-item cost adjustment, an explicit Commit() releases the G/L Entry table lock while NextEntryNo is still cached, allowing a concurrent session to read the same last entry number and hit a duplicate-key error.

Fix

  • Gen. Jnl.-Post Line: new ResetTransactionState that clears the transaction-scoped caches so the next post re-takes the G/L Entry lock and re-reads the last entry number.
  • Inventory Posting To G/L / Item Jnl.-Post Line: ResetGLPostingState plumbing to forward the reset.
  • Inventory Adjustment.CheckAndCommit: calls the reset after each Commit() and emits feature telemetry (event ID 0000MEQ).
  • Parallel-run test coverage.

Localization

The W1 change is propagated to all affected country layers (APAC, BE, CH, ES, FI, FR, IT, NA, NO, RU) via miapp.

alexei-dobriansky and others added 3 commits June 30, 2026 18:33
… cost adjustment

Adds ResetTransactionState / ResetGLPostingState plumbing so an explicit Commit() during item-by-item cost adjustment re-takes the G/L Entry table lock and re-reads the last entry number, preventing a duplicate-key race. Includes feature telemetry and parallel-run tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ayers + telemetry tag

Propagates the ResetTransactionState / ResetGLPostingState fix from W1 to all country localizations (APAC, BE, CH, ES, FI, FR, IT, NA, NO, RU) via miapp. Also assigns telemetry event-ID tag 0000MEQ to the cost-adjustment item-by-item commit usage telemetry in W1, APAC and RU.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…637264-ResetPostingCUsStateAfterCommitInCostAdjmt
@alexei-dobriansky alexei-dobriansky requested a review from a team June 30, 2026 19:29
@alexei-dobriansky alexei-dobriansky self-assigned this Jun 30, 2026
@alexei-dobriansky alexei-dobriansky added the SCM GitHub request for SCM area label Jun 30, 2026
@github-actions github-actions Bot modified the milestone: Version 29.0 Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 1 · Outcome: completed

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant