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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Is There A Relation Between LedgerJournalTrans and TaxLedgerAccountGroup Tables?

(0) ShareShare
ReportReport
Posted on by 1,038

Hello awesome community! I'm new to AX, still learning and I seek your help if you please :)

Is there any relation between LedgerJournalTrans and TaxLedgerAccountGroup weather direct or indirect?f

I want to get the "TaxLedgerAccountGroup.TaxOutgoingLedgerDimension" by having (by knowing) "LedgerJournalTrans.LedgerDimension" if possible or any field related to LedgerJournalTrans. 

because I want to get the "Sales Tax Payable" Account and Name for a line in a journal.

Thanks in advance!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at

    Hi Momochi,

    This link will not work as the TaxOutgingLedgerDimension value is not the same as the LedgerDimension. Can you elaborate if you are using a journal with the Tax main account directly? Usually Tax is being calculated based on settings for the Sales Tax Group and Item sales tax Group.

  • Verified answer
    Momochi Profile Picture
    1,038 on at

    Thank you Mr. Andre for your reply and help!

    I found a solution, here is the select:

    select _mainaccount
            join DimensionAttributeValueCombination
            join TaxLedgerAccountGroup
            join TaxTable
            where TaxTable.TaxCode == LJtrans.TaxItemGroup &&
            TaxLedgerAccountGroup.TaxAccountGroup == TaxTable.TaxAccountGroup &&
            DimensionAttributeValueCombination.RecId == TaxLedgerAccountGroup.TaxOutgoingLedgerDimension &&
            _mainaccount.RecId == DimensionAttributeValueCombination.MainAccount;
            reportLine.VatMainAccount = _mainaccount.MainAccountId;
            reportLine.VatAccountName = _mainaccount.Name;


    But Note*: This select will only get correct data IF ONLY the TaxCode and TaxItemGroup have the same name! if the environment has them with different names, we need to add more tables to the above select in order to get the correct result, the tables are I believe: "TaxGroupHeading, TaxGroupData, TaxOnItem and TaxItemGroup"

    Hope it's clear, the above select is working in my environment since the TaxCode and TaxItemGroup share the same names. 

    I was blinded by the LedgerDimension when I didn't actually needed it in this case

    Thanks again Mr. Andre for your time :) 

  • André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at

    Thanks for the feedback. Good that you mentioned the limitation in your case where you have set the TaxCode and TaxItemGroup the same. Other persons might indeed need a different query.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans