Skip to content

(Bug 634881): [Subcontracting] Item Charges: Remove toggle, remove separate action, use standard Get Receipt Lines#8359

Merged
alexei-dobriansky merged 1 commit into
mainfrom
bugs/634881-Subcon_NoSeparateActionForSubconItemCharge
May 28, 2026
Merged

(Bug 634881): [Subcontracting] Item Charges: Remove toggle, remove separate action, use standard Get Receipt Lines#8359
alexei-dobriansky merged 1 commit into
mainfrom
bugs/634881-Subcon_NoSeparateActionForSubconItemCharge

Conversation

@alexei-dobriansky
Copy link
Copy Markdown
Contributor

@alexei-dobriansky alexei-dobriansky commented May 27, 2026

Fixes AB#634881

Summary

The Subcontracting app required an opt-in toggle (Item Charge to Subcontracting Purch. Receipt Lines) and exposed a redundant Get Receipt Lines for Subcontracting action on the Item Charge Assignment (Purch.) page. The toggle blocked the standard Get Receipt Lines from succeeding on subcontracting receipt lines (it errored with Work Center No. must be blank); the duplicate action existed solely to work around that. Community feedback (Viva Engage thread on the bug) was unanimous that both add friction without benefit.

This PR removes the toggle, deletes the duplicate action, makes the underlying event-subscriber bypass unconditional, and surfaces the production-order reference fields on the standard Purch. Receipt Lines page so users can distinguish subcontracting lines.

Changes

Subcontracting app (App/BCApps/src/Apps/W1/Subcontracting/App)

  • src/Setup/Tables/SubcManufacturingSetup.TableExt.al — removed field 99001510 RefItemChargeToRcptSubLines and the ItemChargeToRcptSubReferenceEnabled() helper.
  • src/Setup/Pages/SubcManufacturingSetup.PageExt.al — removed the toggle field from the Subcontracting setup page.
  • src/Process/Pageextensions/MasterData/SubcItemChargeAssPurch.PageExt.aldeleted. It only existed to host the redundant Get Receipt Lines for Subcontracting action; the standard Get Receipt Lines now handles subcontracting receipt lines in a single flow.
  • src/Process/Codeunits/Extensions/Purchase/SubcPurchPostExt.Codeunit.al — removed the toggle guards in FillItemJnlLineForSubcontractingItemCharge and SetQuantityBaseOnSubcontractingServiceLine; dropped the now-unused ManufacturingSetup global and namespace import.
  • src/Process/Codeunits/Extensions/Purchase/SubcItemChargeAssPurchExt.Codeunit.al — removed the toggle guard in OnBeforeCreateRcptChargeAssgnt so the subcontracting-aware insertion (which bypasses the "Work Center No. must be blank" check) is now unconditional whenever the app is installed.

BaseApp Manufacturing (App/Layers/W1/BaseApp/Manufacturing)

  • Purchases/History/MfgPurchReceiptLines.PageExt.al — added Routing No., Operation No., Work Center No. after the existing Prod. Order No. field. All three default Visible = false; Prod. Order No. (already there) remains visible as the primary indicator that the line came from a subcontracting receipt. Tooltips follow the established Specifies the number of the related production X phrasing used by the sibling Prod. Order No. field and by the existing SubcTransferLine.TableExt.al / SubcPstdDirectTransfSub.PageExt.al ("non-subcontracting-specific" wording).

Behavior change

The standard Get Receipt Lines lookup on Item Charge Assignment (Purch.) does no pre-filter (the deleted action used to restrict the picker to lines with Prod. Order No. <> ''). Users now see all posted receipt lines and identify subcontracting rows via the new Prod. Order No. column. The "Work Center No. must be blank" error no longer fires for subcontracting lines.

@alexei-dobriansky alexei-dobriansky self-assigned this May 27, 2026
@alexei-dobriansky alexei-dobriansky requested a review from a team as a code owner May 27, 2026 16:11
@alexei-dobriansky alexei-dobriansky added the Subcontracting Subcontracting related activities label May 27, 2026
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label May 27, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

$\textbf{🟠\ High\ Severity\ —\ Performance} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

Feature flag removed, behavior now unconditional

The ItemChargeToRcptSubReferenceEnabled() guard was removed from both SubcItemChargeAssPurchExt and SubcPurchPostExt, and the backing setup field RefItemChargeToRcptSubLines was deleted from the table extension. This unconditionally enables item charge assignment to subcontracting purchase receipt lines for all tenants, including those who had explicitly disabled this behavior, constituting a silent breaking upgrade change.

Recommendation:

  • If this feature is intentionally being made permanent, provide an upgrade codeunit that migrates any existing RefItemChargeToRcptSubLines = false settings and release notes documenting the behavior change. Otherwise restore the feature flag.
// Add upgrade codeunit to handle tenants who had RefItemChargeToRcptSubLines = false
// and document this as a breaking change in release notes.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

@alexei-dobriansky alexei-dobriansky merged commit e137a5b into main May 28, 2026
57 of 59 checks passed
@alexei-dobriansky alexei-dobriansky deleted the bugs/634881-Subcon_NoSeparateActionForSubconItemCharge branch May 28, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Subcontracting Subcontracting related activities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants