Posting a general journal

Journal posting is the next step to do once the journal has been created. Although most of the time journals are posted from the user interface, it is also possible to perform the same operation from the code.

In this recipe, we will explore how a general journal can be posted from code. We are going to process the journal created in the previous recipe.

How to do it...

  1. Open General ledger | Journals | General journal, and find previously created journal or manually create a new one. Note the journal's number.
  2. In the AOT, create a new job named LedgerJournalPost with the following code (replace the text 000420_010 with the journal's number from the previous step):
    static void LedgerJournalPost(Args _args) { LedgerJournalCheckPost ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.