Rebuilding the dimension set balance through code

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…


Clear the dimension set balance ledger dimension cache

The dimension set balance (DSB) rebuild and update will generate the ledger dimensions specific to the dimension set from the ledger dimensions in the GL. The dimension set ledger dimensions that are generated are cached to increase the performance of the DSB rebuild and update. The most common use of the DSB is in the trial…


Update for a data problem with the IsCredit field in the GeneralJournalAccountEntry table

The GeneralJournalAccountEntry table contains the detailed General Ledger entries. The IsCredit field is the correct and easy way to determine if the entry is a debit (false) or a credit (true). From Dynamics AX 2012 RTM until a hot fix that was released on November 6, 2012, there was a problem where the IsCredit field…


Default main account with an invalid chart of accounts: locating and fixing

The following posting error will result if a default main account with an invalid chart of accounts is used during posting. Account structure %1, for the combination %2, is not valid for ledger %3. The message contains the account structure from the ledger, the combination containing the string value of the default main account with…


Batch processing for dimension set balance rebuilds

When performing dimension set balance rebuilds in a batch, be sure to schedule the batches far enough apart that they do not run concurrently. Doing this will eliminate any chance for contention since a rebuild has to process the entire general journal. Dimension set balance updates are optimized to run efficiently even if they run…


Step 6: Implement confirmation/posting of your document

Posting of your document usually consist of creating accounting entries in ledger and updating your document to posted state. Source Document Framework will help you create accounting. a)      Add code necessary to perform state update of your document during posting (for instance, you can add a field IsPosted to your document header and set it…


Step 5: Add code to distribute and journalize source document amounts

There might be a need to create new monetary amounts but that is optional and you may find existing monetary amounts sufficient. It depends if existing monetary amounts are a good fit for your document and have appropriate names to display on accounting distributions form. Either new or existing MonetaryAmount enum values will be used…


Step 4: Add Source Document Framework forms to your document UI

This initial wiring will just display empty windows as you didn’t create code which would calculate distributions. But it is good to do it now to be able to have a quick visual test when you later add code related to distributions. a)      Make sure you supplied both Label and SingularLabel for your document header…


Step 3: Perform initial wiring to Source Document Framework – document classes

Now you need to implement few classes representing your source document. a)      Create a class which extends SourceDocumentType. Using framework naming standards name this class MyDocumentSourceDocumentType. Implement all abstract methods (see examples in the following existing classes: CustInvoiceSourceDocType, VendorInvoiceSourceDocType, PurchaseOrderSourceDocumentType) – parmModule(): used to determine whether it is valid to add entries to subledger for given…


Step 2: Perform initial wiring to Source Document Framework – tables and maps

The Source Document Framework (Accounting Framework) will provide functionality necessary to record business events and create accounting for the newly created document – accounting distributions and subledger journal entries. But you will need to inform the framework how to deal with your document. a)      Reference source document header Modify the table definition of your document…