Use case: Your organization would like to retire the current item master and recreate item master with a new item number. This could have various reasons - compliance related, data structure related (e.g. want to move from product/released product structure to product masters and variants) and many more. I personally came across that scenario in implementations 3 times over the last 4 years. The question is now how do I handle the migration process of master data as well as how do I migrate legacy onhand at correct cost in a production instance. Find the answer below.
1. Close open POs, SOs, inventory transactions and Production orders.
2. Run inventory close if required. (if moving average costing method is used this step can be skipped as D365FO by design calculates cost by moving average.)
3. Use counting journal to count out on hand inventory at correct cost. Here, we leveraged the onhand function and include all items that need to be migrated via records to include filter.
4. Now we use Tablebrowser and InventTrans Table to extract journal lines for on hand that was just deducted via the journal in 3. Filter by journal name from 3 and export the filter results to excel. Note: Find more information on Tablebrowser on my previous post: https://www.dynamicsduoacademy.com/post/usage-of-tablebrowser-extension
5. Export current item master with standard entities (sequenced correctly) as zipped package.
6. Manipulate the Csv/excel extracts and add the new item number accordingly in product and item number fields. Replace the files in the zipped package from 5 with the manipulated files from 6. That way, the manifest is still intact and we can import as package.
7. Import the manipulated/adjusted entities in correct sequence via DMF import package. (master data migration)
8. Use movement header and lines v3 entity to bring back on hand inventory at correct cost and expense to a 99999 dummy main account. We translate the inventory dimension as well as cost amounts from the InventTrans extracts in 4 into the movement header and lines v3 entity. Make sure you adjust the item number to the new item number imported in 7.
9. For all legacy items set the stopped flag in the default order settings either manually or update in bulk via DMF and default order settings entity. That way the old legacy items cannot be used for transactions moving forward accidently.