This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
Hi Is there any x++ script to block Production Order Ended if there is still remaining qty. So they can't ended the Job work order. |
Hi Is there any x++ script to block Production Order Ended if there is still remaining qty. So they can't ended the Job work order. |
|
|
|
|
|
|
Dynamics AX provides a framework, which can be used to update production orders to a specific status. In the example, a production order is ended/finished.
If you want to update several production orders at the same time, you must invoke the ProdMultiHistoricalCost.insert() method per production order and pass the respective record of ProdTable.
{
ProdTable prodTable;
ProdMultiHistoricalCost prodMultiHistoricalCost;
prodTable = ProdTable::find("P000195");
prodMultiHistoricalCost = ProdMultiHistoricalCost::construct(new Args());
RunBaseMultiParm::initParm(prodMultiHistoricalCost);
prodMultiHistoricalCost.insert(prodTable, prodMultiHistoricalCost.defaultParmBuffer());
prodMultiHistoricalCost.run();
}