Hi,
I had created one field named Obsolete code in Invent table and BOM table . If i insert a data in the field obsolete code in invent table it should automatically inserted to the Obsoletecode field in BOM Table . I am new to ax .
BOMTable is not directly related to InventTable. What is your actual requirement? Which BOMTable records should be updated, if one InventTable is updated?
Would it be enough to have this field only in InventTable? And let your processes read it from there, instead of BOMTable?
Anyway, you can hook in insert/update methods/events of InventTable, and write there some code to update any tables and fields.
I newly created a field called Obsoletecode in Invent TAble and BOM Table also. If I enter a Obsolete code in Invent table (Newly inserting ) it should automatically inserted to the Obsolete code field in BOM Table .
Yes, but on which BOMTable(s)?
There are many InventTable records, and many BOMTable records, but they don't have any direct relation. So, let's assume your Obsoletecode item "ABC123" is now updated. Which BOMTable records are you going to update?
Especially if you are talking about inserting of InventTable = creating a new record..
Anyway, I think your original question is answered, I was just curious on what you want to achieve, and if there's a better way to achieve it.
Hi Nikolaos for example if i am entering Obsolete code in invent table as "A1" for Item id "01", in BOM table also in the obsoletecode field "A1" should be entered for the same item id "01". If i am changing the obsolete code for that item id "01" as "B1" it should updated on the BOM table also . i need x++ code for that .
Hi karthikeyanbalakrishnan,
Can you also tell more about the process and the purpose to have these fields? If it is on the InventTable, what is the reason to duplicate this information?
PS. I do think you intended to mention the table "BOM"?
Before doing any development, I think it's good if you visualize to yourself what you want to achieve. Like I said, BOMTAble is not related to InventTable (there's no ItemId field in BOMTable). So you need to now define how you are going to find the correct BOMTables to update. Before that we don't need to think about x++ code. You only need to write code once you have described what it should do.
Remember, a BOM can have many items. It can have 50 items, and all of them might have different ObsoleteCode. So perhaps you need to think a bit more about your requirement.
Hi Nicholaos i said "BOM" Table not "BOMTABLE". Sorry .
Ok, thanks for clarifying. I know you wrote "BOM Table" in your question but you also wrote "Invent table" so it was not clear if you mean BOMTable or BOM.
Anyway, I recommend you not updating any field from InventTable to all related BOM records. Instead read this field directly from InventTable. We don't know what you want to achieve functionally, but whenever you have a BOM record in your process, you can find the related InventTable, using ItemId, and check the ObsoleteCode from there.
Duplicating this information is not necessary, in fact it's not a very good idea. Let's imagine you have 100 000 BOM records for one item. Every time you update Obsoletecode for the item, the system now has to update 100 000 BOM records, too, slowing the system down.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,100
André Arnaud de Cal... 890 Super User 2025 Season 2
Sohaib Cheema 633 User Group Leader