Skip to content

[Extensibility Request] issue 12534: Event Request Codeunit 99000893 "Mfg. Create Put-away" - OnCreateBreakPackageLinesOnAfterCalcQty - #12883

Open
business-central-extensibility-bot[bot] wants to merge 2 commits into
mainfrom
bc-extrequest-implement/ext_issue-12534
Open

business-central-extensibility-bot[bot] wants to merge 2 commits into
mainfrom
bc-extrequest-implement/ext_issue-12534

Conversation

@business-central-extensibility-bot

@business-central-extensibility-bot business-central-extensibility-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Splitting production output put-away buffers into multiple lines cannot currently adjust the break-package quantity for untracked items, so every buffer line receives the full remaining quantity. This adds a per-buffer integration event immediately after the quantity is calculated, allowing subscribers to recalculate it while retaining the standard behavior by default.

Changes Made

  • Codeunit 99000893 "Mfg. Create Put-away" / CreateBreakPackageLines - publish the temporary tracking buffer, production order line, worksheet context, and calculated quantity so extensions can override the quantity for each split line.

Fixes #12534

Important

AI-generated: content may be inaccurate or incomplete. Please review and verify before relying on or merging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Request Changes

What this PR does

This change adds an integration event immediately after CreateBreakPackageLines calculates the quantity. Subscribers receive the current temporary tracking buffer, production order line, worksheet context, and a mutable quantity for each split buffer record.

The event parameters and placement fit the requested per-buffer adjustment. However, the procedure's only caller is behind an always-false comparison, so the new event cannot run.

Problem-solution fit

Fit: Partial

The extension point is narrow and leaves standard behavior unchanged when no subscriber is present. Its current call path is unreachable, so it does not yet enable the reported scenario.

Suggestions

S1 (🔴 High): New event is never raised
CreateBreakPackageLines has only one caller, and its guard compares ProdOrderLine."Qty. per Unit of Measure" with the same field, so it can never be true. Correct that guard or move this event to the reachable line-creation path; otherwise subscribers cannot handle the requested scenario.

Risk assessment and necessity

Risk: The event surface is additive and does not change standard behavior without a subscriber. As written, partner code can subscribe successfully but the publisher is never reached, so the requested quantity correction still cannot run.

Necessity: Split buffer records for an untracked item need a per-buffer quantity hook because the standard calculation uses the full remaining put-away quantity. The proposed event is the right shape, but its call path must be reachable before it provides that capability.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=12883 round=1 by=alexei-dobriansky at=2026-10-20T00:10:42.8792560Z lastSha=75c094129cecaf9fc801a50138aa1d0bea46b466 reviewKey=e1a80d0e114f60fba509981958bf883450afa22a98a08e2943fdec38dc0c6c5e suggestions=S1@63321e14

@alexei-dobriansky alexei-dobriansky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code?

Compare the production output UOM quantity against the put-away UOM quantity instead of comparing the production field with itself.

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

Copilot-Session: ff76d051-99f6-4e2d-ac2e-aa6314183013

This branch was previously deployed

1 inactive (outdated) deployment
triage — 75c09412 Deployed Oct 19, 2026 by AleksandricMarko via Classify team ownership #8344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved The issue is approved event-request Team: SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event Request Codeunit 99000893 "Mfg. Create Put-away" - OnCreateBreakPackageLinesOnAfterCalcQty

2 participants