Hi,
My client recently asks me that he needs to change the inventory unit for an item that already have transaction. Since AX 2012 doesn't allow it in any funcional way, he asked me to do this in a "developer way".
We suggested him to do create a new item instead of change the original one. He said it's ok, but only if we can delete the original one or hide in everywhere on AX. Mark the original item as "Stopped" in Default Order Settings is not an option to him since it will still be visible in any item lookup.
I already tried to programmatically change the item invent unit in a test environment doing the follow steps:
1. Close all inventory transactions for the item
2. Issue all the Physical Inventory through a Movement Journal
3. Update the InventTableModule table
4. "Bring back" the issued quantities, recalculated in the new unit, also through a Movement Journal
After doing the changes, everything was working fine in a first look, until I came across a scenario envolving a WHS Work with more than onde Put work line, where integer quantities were turned into decimal in a very simple division. Since I have never came across this situation until I did the changes, It makes me rethink the strategy.
So, after that, my questions is: Does anyone have any suggestions about how can I get a new InventoryUnit for an item "without left behind" any obsolete records?
By the way, I apologize if my English is not so easy to understand.
Thanks