Journals in Dynamics 365 for Finance and Operations 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 the virtual processing of any type of posting: ledger account transfers, fixed asset operations, customer/vendor payments, bank operations, project expenses, and so on. Journals, such as the fixed assets journal, payment journal in Accounts receivable or Accounts payable, 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 the 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.