microsoft / microsoft/BCApps

[BC Idea]: Assembly Line Original Item No.

Open
#10,910 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved BCIdea Team: SCM
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. and Originally Ordered Var. Code
  • Prod. Order Component: Original Item No. and Original 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
  1. Add Original Item No. and Original Variant Code to table Assembly Line and table Posted Assembly Line (same pattern as Prod. Order Component).

  2. Refactor ItemAssemblySubstGet so 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.
  3. When posting, copy Original Item No. and Original Variant Code from Assembly Line to Posted Assembly Line (same transfer as other assembly line fields).

  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.