COSCostBalancesRecalcAll Class [AX 2012]

The COSCostBalancesRecalcAll class is used for summarizing the cost account values from a transaction into period balances.

class COSCostBalancesRecalcAll

Run On

Server

  MethodDescription
Gg767140.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg767140.pubmethod(en-us,AX.60).gif deleteBal Removes all costing balances in a fiscal year.
Gg767140.protmethod(en-us,AX.60).gif deleteBalances
Gg767140.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg767140.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.
Gg767140.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg767140.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg767140.protmethod(en-us,AX.60).gif isBasePlan
Gg767140.protmethod(en-us,AX.60).gif mustCalcWorkload
Gg767140.protmethod(en-us,AX.60).gif new Initializes a new instance of the COSCostBalancesRecalcAll class.
Gg767140.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.)
Gg767140.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.)
Gg767140.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg767140.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg767140.pubmethod(en-us,AX.60).gif parmCOSCalculationId Gets or sets the COSCalculationId parameter.
Gg767140.pubmethod(en-us,AX.60).gif parmCOSPlanModelId Gets or sets the COSPlanModelId parameter.
Gg767140.protmethod(en-us,AX.60).gif planWorkLoad
Gg767140.pubmethod(en-us,AX.60).gif recalc
Gg767140.pubmethod(en-us,AX.60).gif recalcAll Calculates all costing balances in a fiscal year.
Gg767140.pubmethod(en-us,AX.60).gif recalcPlanModel
Gg767140.protmethod(en-us,AX.60).gif recalcStartDate
Gg767140.pubmethod(en-us,AX.60).gif recalcValueType Calculates costing balances in a fiscal year for a specified value type.
Gg767140.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg767140.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg767140.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.)
Gg767140.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg767140.protmethod(en-us,AX.60).gif workLoad
Gg767140.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg767140.pubmethod(en-us,AX.60).gif Gg767140.static(en-us,AX.60).gif ::construct
Gg767140.pubmethod(en-us,AX.60).gif Gg767140.static(en-us,AX.60).gif ::newCalcPlan
Gg767140.pubmethod(en-us,AX.60).gif Gg767140.static(en-us,AX.60).gif ::newEntryType
Gg767140.pubmethod(en-us,AX.60).gif Gg767140.static(en-us,AX.60).gif ::recalculateCurrentCalendarBalances Recalculates the cost and service balances that belong to the current fiscal calendar.
Top

The summary occurs during each write operation on costing transactions. The class can be used for the recalculation of cost account balances. There are three different types of transactions in cost accounting:

  • Current values are stored in the COSCostTrans table.

  • Budget values are stored in the COSCostBudget table.

  • Plan values are stored in the COSPlanCostTrans table.

The old balances should be deleted before the recalculation of balances.

This example demonstrates the use of the COSCostBalancesRecalcAll class. However, this example will not compile in a job as it must be compiled in the context of a class, form, or other object.

This following example recalculates base plan costs for planmode 200502.

static void example(COSFiscalYear _COSFiscalYear) 
{ 
    cosPlanTable             cosPlanTable; 
    cosCostBalancesRecalcAll cosCostBalancesRecalcAll; 
    ; 
    cosPlanTable = COSPlanTable::find("200502", _COSFiscalYear); 
     
    // Period values; no calculation set. 
    cosCostBalancesRecalcAll =  
        new COSCostBalancesRecalcAll("", 
                 cosPlanTable.PlanModelId); 
 
    cosCostBalancesRecalcAll.deleteBalValueType(cosPlanTable.FiscalYear, 
                                    COSCostValueType::BasePlanCost); 
    cosCostBalancesRecalcAll.recalcValueType(cosPlanTable.FiscalYear, 
                                    COSCostValueType::BasePlanCost); 
}

Object Class
  COSCostBalancesRecalcAll Class
    COSWorkBalancesRecalcAll Class

Community Additions

ADD
Show: