[BC Idea]: Assembly Line Original Item No.
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
BC Idea Link
https://experience.dynamics.com/ideas/idea/?ideaid=c70410e0-2aa6-f111-85cd-7c1e52ed85fa
Description
The Sales Lines, Prod. Order Components, and Assembly Lines all have Item Substitution functionality. Assembly Lines are missing Original Item No. and Original Variant Code. Add the same functionality so that, when a substitution happens, the original item no. and variant are stored in those fields before the line is updated to the substitute.
Problem
Item Substitution already exists on:
- Sales lines (
Item Subst..ItemSubstGet) - Prod. order components (
Mfg. Item Substitution.GetProdOrderCompSubst / UpdateProdOrderComp) - Assembly lines (
Item Subst..ItemAssemblySubstGet)
After a substitution, sales and production keep the original item:
- Sales Line:
Originally Ordered No.andOriginally Ordered Var. Code - Prod. Order Component:
Original Item No.andOriginal Variant Code
ItemAssemblySubstGet already captures the original values in SaveItemNo and SaveVariantCode, but it never stores them on the assembly line. Assembly Line and Posted Assembly Line have no equivalent fields, so after Select Item Substitution the original component is lost on the order and after posting.
That makes it harder to:
- See which BOM component was replaced
- Trace substitutions on assembly documents and posted assembly documents
- Keep assembly behavior aligned with sales and production
Proposed change
-
Add Original Item No. and Original Variant Code to table
Assembly Lineand tablePosted Assembly Line(same pattern as Prod. Order Component). -
Refactor
ItemAssemblySubstGetso the temp assembly line update is moved to a new local procedure, matching sales:ItemSubstGetPopulateTempAssemblyLine- After the user selects a substitute, assign:
- Original Item No. := SaveItemNo
- Original Variant Code := SaveVariantCode
- Then validate the substitute item/variant, quantity, location, and UOM as today.
-
When posting, copy Original Item No. and Original Variant Code from Assembly Line to Posted Assembly Line (same transfer as other assembly line fields).
-
Add both fields to:
- Assembly Order Subform
- Posted Assembly Order Subform
Set Visible = false on both pages.
I will provide the implementation for this BC Idea
- I will provide the implementation for this BC Idea
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ItemAssemblySubstGet and compare its behavior with the cited sales and production substitution procedures. Review Assembly Line, Posted Assembly Line, Assembly Order Subform, and Posted Assembly Order Subform for the corresponding fields and posting transfer. Done means original item and variant values survive substitution and posting, with the new page fields hidden.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100