Reputation: 1022
my task is to delete a specific article from all bills of materials (BOMs) in AX 2009.
I understand that the BOMTable
table contains the header and the BOM
table contains the lines. They are connected via the BOMId
.
The BOM
table holds a field ItemId
which is the InventTable.ItemId
.
Is the assumption correct, that it is sufficent to delete all rows from BOM
table where the BOM.ItemId == InventTable.ItemId
?
And is there anything else which needs to be considered?
Any help is appreciated
Upvotes: 3
Views: 590
Reputation: 1369
Your assumptions are correct. If you want to clear a specific item from all BOM versions, you would just remove all BOM records with a matching ItemId.
However, this does affect all Versions of all BOMs. I believe if you want to be able to maintain historical versions, you would need to additionally reference BOMVersion and pull only Active BOMs.
Also, this change would only take effect on new production of the item going forward; any open production orders of items affected by the change would still have the old BOM.
Upvotes: 5