Production order should not get Released on material shortage
Update 27.08.2024: The below issue has ultimately been solved by Microsoft in Update 38, see What’s new or changed in Dynamics 365 Supply Chain Management 10.0.38 (February 2024) – Supply Chain Management | Dynamics 365 | Microsoft Learn. The feature “Prevent production orders to be released when full material is not available” is described as follows: “Fixes an issue where the production control parameter Requirement for material reservation is set to Require full reservation. Previously, when a production order was released while this option was selected, its status was always changed from Scheduled to Released, even if all material couldn’t be fully reserved. When this feature is enabled, when a production order is released with this option selected, the production order will only change status once all material is fully available for reservation.”
There is an evergreen issue in Dynamics 365 material reservation for production: despite the policy “Require full reservation“, the production order is released even if there is a shortage of materials:
The issue is very well known, I have been combating it since 2018. It has been reported to Microsoft on numerous occasions by my colleagues around the world: Production order should not get status Released if raw material release to warehouse fails.
The consequences are dire. A released order’s jobs will appear on the Shop floor control terminal and animate the worker to start the order. In the course of the assembly the worker is going to be forced to interrupt his/her work and fetch the parts from the warehouse. Later, at the report as finished / material backflushing stage at the Production floor terminal, it is going to prevent the online material consumption if the backflushing principle is set to Finish.
Apparently, the BOM line and the warehouse work generation are not in the same transaction scope as the overall production order release. Indeed, the ProdWHSRelease call is performed outside of the ttsbegin/ttscommit pair in ProdUpdRelease
Since Microsoft refuses to fix this problem, let me publish a programmatic solution. We put the ProdWHSRelease call into the endUpdateProduction() method if the order requires full reservation. Then we prevent the execution of ProdWHSRelease for the second time by temporarily changing one parameter and then reverting it back:
ttscommit;
this.printout();
}
}
catch (Exception::Deadlock)
{
retry;
}
...
prodTable.reread();
if (ProdParametersDim::find(prodTable.InventDimId).ProductionLineRelease == WHSProductionLineRelease::OnProdOrderRelease)
{
ProdWHSRelease::newFromProdParmRelease(prodParmRelease).whsReleaseSingleOrder(prodTable);
}
Production and Manufacturing blog series
Further reading:
D365 Mass de-reservation utility
Picking list journal: Inventory dimension Location must be specified
Consumable “Kanban” parts in D365 Warehouse management
Subcontracting with Warehouse management Part 2
Subcontracting with Warehouse management Part 1
Semi-finished goods in an advanced warehouse
The case of a missing flushing principle