COSWorkBalancesRecalcAll Class [AX 2012]

The COSWorkBalancesRecalcAll class summarizes work account values from a transaction into period balances during each written operation on work transactions.

class COSWorkBalancesRecalcAll extends COSCostBalancesRecalcAll

Run On

Server

  MethodDescription
Gg759536.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif deleteBal Removes all costing balances in a fiscal year. (Overrides the deleteBal Method.)
Gg759536.protmethod(en-us,AX.60).gif deleteBalances (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg759536.protmethod(en-us,AX.60).gif fiscalCalendarPeriod Finds the record of the FiscalCalendarPeriod table for the specified date in the fiscal calendar associated with the company information record. (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg759536.protmethod(en-us,AX.60).gif isBasePlan (Inherited from COSCostBalancesRecalcAll.)
Gg759536.protmethod(en-us,AX.60).gif mustCalcWorkload (Overrides the mustCalcWorkload Method.)
Gg759536.protmethod(en-us,AX.60).gif new Initializes a new instance of the COSWorkBalancesRecalcAll class. (Overrides the new Method.)
Gg759536.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif parmCOSCalculationId Gets or sets the COSCalculationId parameter. (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif parmCOSPlanModelId Gets or sets the COSPlanModelId parameter. (Inherited from COSCostBalancesRecalcAll.)
Gg759536.protmethod(en-us,AX.60).gif planWorkLoad (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif recalc (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif recalcAll Calculates all costing balances in a fiscal year. (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif recalcOffset Recalculates and updates COSWorkOffset.
Gg759536.pubmethod(en-us,AX.60).gif recalcPlanModel (Inherited from COSCostBalancesRecalcAll.)
Gg759536.protmethod(en-us,AX.60).gif recalcStartDate (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif recalcValueType Calculates the costing balances in a fiscal year for a specified value type. (Overrides the recalcValueType Method.)
Gg759536.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg759536.protmethod(en-us,AX.60).gif workLoad (Inherited from COSCostBalancesRecalcAll.)
Gg759536.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg759536.pubmethod(en-us,AX.60).gif Gg759536.static(en-us,AX.60).gif ::construct
Gg759536.pubmethod(en-us,AX.60).gif Gg759536.static(en-us,AX.60).gif ::newCalcPlan
Top

This class also recalculates work accounts balances.

There are three different types of transactions in cost accounting:

  • Current values are stored in the COSWortTrans table.

  • Budget values are stored in the COSWorkBudget table.

  • Plan values are stored in the COSPlanWorkTrans table.

The old balances should be deleted before balances are recalculated.

The following code example recalculates base plan costs for planmode 200502. This example will not compile in a job as it must be run in the context of a class, form, or other object.

static void example(COSFiscalYear _COSFiscalYear) 
{ 
    cosPlanTable cosPlanTable; 
    cosWorkBalancesRecalcAll cosWorkBalancesRecalcAll; 
 
   cosPlanTable = COSPlanTable::find("200502",_COSFiscalYear); 
 
    // Period values, no calculation set. 
    cosWorkBalancesRecalcAll =   
       COSWorkBalancesRecalcAll::newCalcPlan
           ("",cosPlanTable.PlanModelId); 
 
    cosWorkBalancesRecalcAll.deleteBal ( 
       cosPlanTable.FiscalYear); 
    cosWorkBalancesRecalcAll.recalcValueType( 
       cosPlanTable.FiscalYear, 
       COSCostValueType::BasePlanCost); 
}

Object Class
  COSCostBalancesRecalcAll Class
    COSWorkBalancesRecalcAll Class

Community Additions

ADD
Show: