ProdUpdBOMCalc Class [AX 2012]
The ProdUpdBOMCalc class is used for making the estimated price calculation for production orders.
| Method | Description | |
|---|---|---|
| addCreatedRec | (Inherited from UpdateBase.) |
| addDeletedRec | (Inherited from UpdateBase.) |
| addUpdateRec | (Inherited from UpdateBase.) |
| cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
| createdRecs | (Inherited from UpdateBase.) |
| deletedRecs | (Inherited from UpdateBase.) |
| equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
| getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
| handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
| initProdTable | Initializes the prodTable variable with a value from the parameter table. (Inherited from ProdUpd.) |
| mergeCreatedRecs | (Inherited from UpdateBase.) |
| mergeDeletedRecs | (Inherited from UpdateBase.) |
| mergeRecs | (Inherited from UpdateBase.) |
| mergeUpdateRecs | (Inherited from UpdateBase.) |
| new | Initializes a new instance of the UpdateBase class. (Inherited from UpdateBase.) |
| notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
| notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
| objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
| owner | Returns the instance that owns the object. (Inherited from Object.) |
| packCreatedRecs | (Inherited from UpdateBase.) |
| parmParmBuffer | Gets or sets the ProdParmBOMCalc record. (Overrides the parmParmBuffer Method.) |
| prodTable | Returns the value of the prodTable variable, specifying which production order will be updated. (Inherited from ProdUpd.) |
| run | Used for the start of price calculation. (Overrides the run Method.) |
| setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
| toString | Returns a string that represents the current object. (Inherited from Object.) |
| updatedRecs | (Inherited from UpdateBase.) |
| updateJobJournal | (Inherited from UpdateBase.) |
| usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
| validate | (Inherited from UpdateBase.) |
| wait | Pauses a process. (Inherited from Object.) |
| xml | Returns an XML string that represents the current object. (Inherited from Object.) |
| ::construct | Initializes a new instance of the ProdUpdBOMCalc class. |
| ::newParmBuffer | Creates a new instance of ProdUpdBOMCalc class, and initializes it with parameters from ProdParmBOMCalc table. |
| ::newProdTable | Creates a new instance of the ProdUpdBOMCalc class, and initializes it with given parameters. |
You can run the price calculation for a single production order, or for a whole chain of production orders that are related to each other by references. You cannot use this class for realized price calculation. Realized price calculation will be performed automatically when production journals are posted, or production End for the ProdMultiHistoricalCost is started.
boolean runProdPriceCalc(ProdTable _prodTable, NoYes references = NoYes::Yes)
{
try
{
// If References is set to 'Yes', the price calculation will be
// done for all production orders which are related to each
// other and have status more than 'Created'.
// If References is set to 'No', price calculation will be done
// the only for current production order if it has status more
// than 'Created'.
if(_prodTable)
ProdUpdBOMCalc::newProdTable(
_prodTable,
ProdParameters::find().profitSet,
systemdateGet(),
references).run();
else
throw error("ProdTable has been not initialized");
}
catch (Exception::Error)
{
return false;
}
return true;
}
Community Additions
ADD
Show: