web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

LedgerJournalTrans main accounts when account type is not Ledger

(0) ShareShare
ReportReport
Posted on by

I have a requirement where I am given a main account and date range and I need to provide the general ledger entries, plus their associated ledger journal lines. 

It is easy enough to grab the correct general journal rows because GeneralJournalAccountEntry has main account (through LedgerDimension) and GeneralJournaEntry has the accounting date.  But I am having trouble getting the related rows in LedgerJournalTrans. 

If the LedgerJournalTrans row has Account Type or Offset Account Type value of 'Ledger' then the LedgerDimension or OffsetLedgerDimension can be used to get the main account.  That works fine. 

But what about this actual example?  The LedgerJournalTrans row has Account Type = 'Vendor', Account = '16000', Offset Account Type = 'Ledger', Offset Account = Null.  How could I know that that row has the required main account?  I checked vendor '16000': neither the Vendor detail form, the Invoice>Default Account, or the Invoice>Posting form shows any tie to the main account of interest.

Currently, I am provided only LedgerJournalTrans rows with AccountType = 'Ledger' and the main account, or OffsetAccountType = 'Ledger' and the main account.  But then I am excluding rows such as the one above, and the LedgerJournalTrans sum can be many thousands of dollars less than the GeneralJournalAccountEntry total for the main account. 

On the other hand, if I ignore AccountType, Account, OffsetAccountType, and OffsetAccount, and provide all LedgerJournalTrans rows, then I am including rows that are not for the main account of interest, and the LedgerJournalTrans sum can be many thousands of dollars more than the GeneralJournalAccountEntry total for the main account.

*This post is locked for comments

I have the same question (0)
  • Bilal Issa Profile Picture
    4,370 on at

    Hi ,

    please check the link below, it should give you a start.

    sumitsaxfactor.wordpress.com/.../getting-ledger-transactions-in-ax-2012

    Regards,

    Bilal

  • Community Member Profile Picture
    on at

    Thanks, I saw the query at that link before posting: it unfortunately doesn't include the LedgerJournalTrans table or how to find the main account for a row when the AccountType is not Ledger.

    The query at that link goes from the general journal cluster of tables to the SubledgerJournalAccounEntry and SubledgerJournalEntry tables.  I already have that part of the overall requirement working so I didn't mention it in my post.

  • Verified answer
    Community Member Profile Picture
    on at

    I found the solution, at least for our company, and it was straightforward.

    I had checked the posting profile for Vendor 16000 (Vendor details form, Invoice > Posting) and also for that vendor's Vendor Group (Vendor group list page, Item Posting), and there was no tie to the main account of interest. 

    But there is in the Accounts Payable > Vendor Posting Profiles.  

    Our setup there is simple, so this might not work for other companies.  We have only 1 Posting Profile, and the Setup fast tab has only half a dozen or so Groups in Account Code, and those rows have only Summary Accounts.   So I can easily enough follow the Vendor on the LedgerJournalTrans line to the VendTable, from there to VendGroup, from there to VendLedgerAccounts, and there look to see if the vendor's vendor group has the main account of interest in the summary account.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans