Dynamics AX GFM Team Blog

Brought to you by Microsoft teams working on the Global Financial Management (GFM) frameworks and applications for Microsoft Dynamics AX 2012 and beyond

Rebuilding the dimension set balance through code

Rebuilding the dimension set balance through code

Rate This
  • Comments 1

The dimension set balance (DSB) rebuild will recreate all balances for each dimension set that is initialized. It can be performed for a single company or for all companies at once.

The DSB rebuild needs to be run if the detailed GL data is deleted or modified by any customization or other means outside of the core AX application. This includes jobs and using SQL directly.

Only invoke the DSB rebuild exactly once after all deleting and modifying of the detailed GL data is complete. Invoking the DSB rebuild more than once for the same change is unnecessary and can result in temporary degradation in performance.

To perform a DSB rebuild you can call DimensionFocusInitializeBalance::scheduleProcessFullRebuild(). This will schedule a batch job to rebuild balances. Pass in Ledger::current() if the detailed GL data that was deleted or modified was limited to the current company/ledger. Don’t pass a ledger parameter value if the detailed GL data that was deleted or modified was in multiple companies/ledgers. It is a normal AX practice to perform updates to a single company/ledger at a time.

Here is an example of a form close method which would be a logical place to do a DSB rebuild if updates came from the form. It is important to note that just closing the form with no changes should not invoke the full DSB rebuild.

private void close()
{

    if (changesMade)
    {

          DimensionFocusInitializeBalance::scheduleProcessFullRebuild(Ledger::current());
    }

}


       

Leave a Comment
  • Please add 1 and 4 and type the answer here:
  • Post
  • It seems that even passing a determined ledger, the batch job will rebuild the balances for all the legal entities inside the partition... Can you please check?

Page 1 of 1 (1 items)