Journals in Dynamics AX are manual worksheets that can be posted into the system. One of the frequently used journals for financial operations is the General journal. It allows processing virtually any type of operation: ledger account transfers, fixed asset operations, customer/vendor payments, bank operations, project expenses, and so on. Journals, such as the Fixed assets journal, or the Payment journal in the Accounts receivable or Accounts payable modules, and many others, are optimized for specific business tasks, but they basically do the same job.
In this recipe, we will demonstrate how to create a new general journal record from code. The journal will hold a single line for debiting one ledger account and crediting another one. For demonstration purposes, we will specify all the input values in the code.