This post is machine-translated. The original post in german language can be found here.

End/finish a production order through code

Screenshot

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.

 

static void prodEnd(Args _args)
{
    ProdTable prodTable;
    ProdMultiHistoricalCost prodMultiHistoricalCost;

    prodTable = ProdTable::find("P000195");

    prodMultiHistoricalCost = ProdMultiHistoricalCost::construct(new Args());
    RunBaseMultiParm::initParm(prodMultiHistoricalCost);
    prodMultiHistoricalCost.insert(prodTable, prodMultiHistoricalCost.defaultParmBuffer());

    prodMultiHistoricalCost.run();
}
These post applies to following version:
Dynamics AX 2012

Jake 07/28/2020 16:04 | #1

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.

Jake 07/28/2020 16:06 | #2

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.

 
 

 

 
 
 
Posts of the actual month
Dezember 2024
MoTuWeThFrSaSu
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.