General journal posted
Fires when a general (daily) journal is posted in the General ledger. The moment a LedgerJournalTable record transitions from unposted to posted - and the journal is of type Daily - the event publishes the journal's identifying details (legal entity, journal number, journal name, description, posting date), enabling downstream ledger reconciliation, financial reporting refreshes, audit logging, or external accounting-system synchronization workflows.
| Event class | MGCLatticeGeneralJournalPostedBusinessEvent |
| Contract class | MGCLatticeGeneralJournalPostedBusinessEventContract |
| Category | General ledger |
| Module | ModuleAxapta::Ledger |
| Label IDs | GeneralJournalPostedBusinessEventName / GeneralJournalPostedBusinessEventDescription |
| Trigger | LedgerJournalCheckPost.runInternalPostJournalTransactionEnded (delegate) -> Posted == Yes && JournalType == Daily |
Trigger / Hook
- Handler class:
MGCLatticeLedgerJournalCheckPost_EventHandler(an event-handler class, not a CoC extension). - Subscription:
[SubscribesTo(classStr(LedgerJournalCheckPost), delegateStr(LedgerJournalCheckPost, runInternalPostJournalTransactionEnded))]on apublic static void postJournalTransactionEnded(LedgerJournalCheckPost _ledgerJournalCheckPost)handler.LedgerJournalCheckPost.runInternal()raises the delegate immediately after the transaction that contains the posting has ended; it is also raised after a simulated posting, whose transaction is aborted. This is the true business moment; a table-level hook onLedgerJournalTablewould also fire for data entity and import writes and be silently skipped by set-based DML. - Firing condition:
- The journal is obtained via
_ledgerJournalCheckPost.parmLedgerJournalTable(). ledgerJournalTable.Posted == NoYes::Yes- the posting code setsPosted(andPostedDateTime) only on the path that commits, so the guard reliably reflects the committed state. Simulate-posting aborts its transaction (Posted stays No) and is therefore suppressed.- Type filter:
ledgerJournalTable.JournalType == LedgerJournalType::Daily- only general (daily) journals fire this event; payment, invoice and other journal types do not. - The event fires once per posted journal, not once per voucher.
- The journal is obtained via
- Enablement gate: wrapped in
BusinessEventsConfigurationReader::isBusinessEventEnabled(classStr(MGCLatticeGeneralJournalPostedBusinessEvent))so the event is sent only when activated against an endpoint.
/// <summary>
/// Triggers the general journal posted business event when a daily journal has been posted.
/// </summary>
[SubscribesTo(classStr(LedgerJournalCheckPost), delegateStr(LedgerJournalCheckPost, runInternalPostJournalTransactionEnded))]
public static void postJournalTransactionEnded(LedgerJournalCheckPost _ledgerJournalCheckPost)
{
LedgerJournalTable ledgerJournalTable = _ledgerJournalCheckPost.parmLedgerJournalTable();
if (ledgerJournalTable.Posted == NoYes::Yes && ledgerJournalTable.JournalType == LedgerJournalType::Daily)
{
if (BusinessEventsConfigurationReader::isBusinessEventEnabled(classStr(MGCLatticeGeneralJournalPostedBusinessEvent)))
{
MGCLatticeGeneralJournalPostedBusinessEvent::newFromLedgerJournalTable(ledgerJournalTable).send();
}
}
}
Payload Contract
One row per [DataMember], in declaration order (sourced from MGCLatticeGeneralJournalPostedBusinessEventContract.initialize(LedgerJournalTable)):
| JSON field | Display label | Type / EDT | Source | Notes |
|---|---|---|---|---|
legalEntity | Legal Entity | DataAreaId | LedgerJournalTable.DataAreaId | Company/legal entity of the journal record, in lower case (for example usmf) |
journalId | Journal ID | str | LedgerJournalTable.JournalNum | The journal batch number |
journalName | Journal Name | str | LedgerJournalTable.JournalName | Journal name (definition) id |
description | Description | str | LedgerJournalTable.Name | Free-text description of the journal |
postedDate | Posted Date | TransDate | DateTimeUtil::date(LedgerJournalTable.PostedDateTime) | Date portion of the PostedDateTime stamp, which the posting code sets from the system date-time in UTC. It is the date the journal was posted (UTC), not the accounting date of its vouchers; serialized in the \/Date(milliseconds)\/ form |
crossReferences | Cross references | List of MGCLatticeCrossReferenceEventContract | MGCLatticeCrossReferenceEventHelper::listFor(LedgerJournalTable) | Keys external systems hold for the journal: one { externalSystem, externalKey } object per external system, ordered by external system, historical keys included; [] when it has none. See Cross-reference keys. |
Every Lattice event also carries the Lattice ordering and correlation envelope, inherited from MGCLatticeBusinessEventContractBase: eventSequence (Int64 - increasing across the whole catalog and all companies, allocated when the event is raised inside the business transaction, not when it commits; it orders the events of one business record, gaps are permanent and normal, and it must not be used to re-sequence the whole stream), correlationId (String, always Scope:Key - groups emissions that belong to one logical run; an event that joins no run carries Event: followed by a lower-case GUID unique to this emission) and schemaVersion (Int - the payload shape version; 1 for this contract). D365 F&O also adds its standard envelope fields to every business event payload: BusinessEventId, BusinessEventLegalEntity, ContextRecordSubject, ControlNumber, EventId, EventTime, EventTimeIso8601, InitiatingUserAADObjectId, MajorVersion, MinorVersion, and ParentContextRecordSubjects. Do not rely on the order of members in the delivered JSON.
Example Payload
{
"BusinessEventId": "MGCLatticeGeneralJournalPostedBusinessEvent",
"ControlNumber": 5637148991,
"EventId": "8D2918AA-B434-46AA-B329-64F297E41D82",
"EventTime": "\/Date(1790248837000)\/",
"EventTimeIso8601": "2026-09-24T11:20:37.7928745Z",
"MajorVersion": 0,
"MinorVersion": 0,
"BusinessEventLegalEntity": "USMF",
"ContextRecordSubject": "",
"InitiatingUserAADObjectId": "{FCBC6B95-F08F-200E-9DB4-9F8944E9477E}",
"ParentContextRecordSubjects": [],
"eventSequence": 48251,
"correlationId": "Event:a83e8ab7-2b2c-47cc-afad-f50fae94246a",
"schemaVersion": 1,
"legalEntity": "usmf",
"journalId": "25746",
"journalName": "GenJrn",
"description": "Monthly accruals - September 2026",
"postedDate": "\/Date(1790208000000)\/",
"crossReferences": [
{
"externalSystem": "LEGACYERP",
"externalKey": "GJ-2026-0918"
}
]
}
Activation
In the D365FO client, go to System administration > Setup > Business events > Business events catalog. Filter the Category column to General ledger (or search for "General journal posted"), select the event, and use Activate to bind it to an endpoint (Event Grid, Azure Service Bus, Power Automate, etc.). Once activated, the event sends on every daily journal that transitions into the posted state.