Posting interface and some other functions in codeunit 12 use posting engine functions to prepare and insert general ledger entry and GST entry records. The posting engine is also responsible for general ledger register creation.
The functions in the following table provide a standard framework for designing posting procedures (such as Code, CustPostApplyCustledgEntry, VendPostApplyVendLedgEntry, UnapplyCustLedgEntry, UnapplyVendLedgEntry, and Reverse) and exclusive access to table 17, G/L Entry.
| Routine | Description |
|---|---|
StartPosting | Initialises posting buffer TempGLEntryBuf, locks G/L Entry and GST Entry tables, and initialises Accounting Period, G/L Register, and Exchange Rate. Should be called only once, then NextEntryNo is 0. |
ContinuePosting | Checks and posts unrealised GST for previous transaction increment NextTransactionNo and prepares post of next line. |
FinishPosting | Completes posting by inserting G/L entries from temporary buffer into database table. Always used together with StartPosting. Checks for inconsistencies. |
InitGLEntry | Used to initialise new G/L entry for Gen. Jnl Line. Returns GLEntry as parameter. |
InitGLEntryVAT | Same as InitGLEntry, but also assigns Bal. Account No. and SummarizeVAT. |
InitGLEntryVATCopy | Similar to InitGLEntryGST, but also copies posting groups data from GST Entry before SummariseGST. |
InsertGLEntry | The only function that inserts G/L entry into global TempGLEntryBuf table. Always use this function for insert. |
CreateGLEntry | Performs an InitGLEntry, assigns Additional Currency Amount, and then performs InsertGLEntry. Replaces several lines of code with a single function call. |
CreateGLEntryBalAcc | Same as CreateGLEntry, but also assigns Bal. Account Type and Bal. Account No. |
CreateGLEntryVAT | Same as CreateGLEntry, but with additional processing for posting groups and saving to temporary GST buffer:
|
CreateGLEntryVATCollectAdj | Same as CreateGLEntry, but with additional collection of adjustments and saving to temporary GST buffer:
|
CreateGLEntryFromVATEntry | Same as CreateGLEntry, but also copies posting groups from GST entry. |





