ProdUpdBOMCalc::newProdTable Method [AX 2012]

Creates a new instance of the ProdUpdBOMCalc class, and initializes it with given parameters.

server public static ProdUpdBOMCalc newProdTable(
    ProdTable _prodTable, 
   [CostProfitSet _profitSet, 
    date _calcDate, 
    NoYes _references])

Run On

Server

Parameters

_prodTable
Type: ProdTable Table
The record from the ProdTable table.
_profitSet
Type: CostProfitSet Enumeration
The profit-setting value; optional.
_calcDate
Type: date
A date for the price calculation; optional.
_references
Type: NoYes Enumeration
A NoYes enumeration that specifies that the References should be used in price calculation; optional.

Return Value

Type: ProdUpdBOMCalc Class
An initialized instance of the ProdUpdBOMCalc class.

This method creates a new record in the ProdParmBOMCalc table, depending on given parameters. It also initializes the new instance of ProdUpdBOMCalc class by using that record, and returns the object of that class.

void startCalculation(ProdTable prodTable,  
    ProdParmCostEstimation prodParmCostEstimation) 
{ 
    ProdUpdBOMCalc::newProdTable( 
        prodTable, 
        prodParmCostEstimation.profitSet, 
        prodTable.DlvDate, 
        prodParmCostEstimation.References).run(); 
}
Show: