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.

Add comment
 
 

 

 
 
 
Posts of the actual month
März 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
25262728293031
 
© 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.