Search code examples
axaptamicrosoft-dynamicsdynamics-ax-2012

Relationship between GeneralJournalAccountEntry and LedgerJournalTrans_Project


We are attempting to relate GL transactions GeneralJournalAccountEntry with their appropriate Project Category Id LedgerJournalTrans_Project, but are having a very difficult time relating the two tables.

We can get there by this route:

  • GeneralJournalAccountEntry.GeneralJournalEntry = GeneralJournalEntry.RecId (Many to 1)
  • GeneralJournalEntry.SubLedgerVoucher = LedgerJournalTrans.Voucher (1 to Many)
  • LedgerJournalTrans.RecId = LedgerJournalTrans_Project.RefRecId (1 to 1)

But the individual leg of the transaction gets lost in the Many to 1 and 1 to Many relationships. We understand the tables are from different "modules", but are hoping there is some way to connect the two without depending on something messy like transaction amount.

Is this possible, or is there another way to accomplish our goal?


Solution

  • There is not a one-to-one relationship.

    The closest thing would be to use Voucher and TransDate on LedgerJournalTrans to fetch ledger transactions.

    See this post.

    There is a white paper describing the AX 2012 ledger posting framework.