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!

 
 

 

 
 
 
Posts of the actual month
April 2025
MoTuWeThFrSaSu
 123456
78910111213
14151617181920
21222324252627
282930 
 
© 2006-2025 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.