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

Cost estimate 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 cost estimated.

If you want to update several production orders at the same time, you must invoke the ProdMultiCostEstimation.insert() method per production order and pass the respective record of ProdTable.

 

static void prodCostEstimation(Args _args)
{
    ProdTable prodTable;
    ProdMultiCostEstimation prodMultiCostEstimation;

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

    prodMultiCostEstimation =
    ProdMultiCostEstimation::construct(new Args());

    RunBaseMultiParm::initParm(prodMultiCostEstimation);
    prodMultiCostEstimation.insert(
        prodTable,
        prodMultiCostEstimation.defaultParmBuffer());

    prodMultiCostEstimation.run();
}

 

These post applies to following version:
Dynamics AX 2012

Peter 03/21/2018 17:19 | #1

Thanks!

Matteo 11/07/2018 12:00 | #2

Works like a charm also in AX2009. Thanks!

Add comment
 
 

 

 
 
 
Posts of the actual month
Januar 2020
MoTuWeThFrSaSu
 12345
6789101112
13141516171819
20212223242526
2728293031 
 
© 2006-2020 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.