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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to get the relation between GeneralJournalEntry/GeneralJournalAccountEntry table to TaxTrans Table

(1) ShareShare
ReportReport
Posted on by 177

Hi there, we have created an Data entity based on GeneralJournalEntry and GeneralJournalAccountEntry Tables. As per the requirement, we need to fetch the TaxTrans.Taxcode in relation with our data entity based on voucher. Is there any relation to join TaxTrans.recid with any of the 2 mentioned tables.  Thanks in advance.

I have the same question (0)
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,946 Super User 2026 Season 1 on at

    Hi Perm,

    You can use voucher as key between GENERALJOURNALENTRY and TaxTrans.

    GENERALJOURNALENTRY.SubLedgerVoucher == TaxTrans Voucher

    GENERALJOURNALACCOUNTENTRY.GENERALJOURNALENTRY = GENERALJOURNALENTRY.RecId

  • PK69 Profile Picture
    177 on at

    Hi Alireza, I had tried with the way you suggested but am getting the duplicate records. I have to call the TaxTrans based on Recid only  to get the required output. Please find the screenshot attached for reference.

    Case 1 :  Query executing GENERALJOURNALACCOUNTENTRY table alone.

    332788.PNG

    Case 2 : Query as u suggested. It was returning 500 records which is not as expected. I need to fetch as many records there in GENERALJOURNALACCOUNTENTRY  table for which i need to fetch TaxTrans.Taxcode for the particular voucher

    4152.PNG

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,946 Super User 2026 Season 1 on at

    Hi Prem,

    Yes.

    You can check LedgerJournalTrans.

    TaxTrans.SourceRecId == LedgerJournalTransRecId

    TaxTrans.SourceTableId == LedgerJournalTrans.TableId

  • PK69 Profile Picture
    177 on at

    Hi ALireza, i had already checked that Table LedgerJournalTrans but i still cant able to establish an relation as per my requirement. Pls suggest the necessary

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,946 Super User 2026 Season 1 on at

    Hi Perm,

    To better understand your requirement. Does standard report "Posted sales tax" work for you? Or do you need TaxCode on voucher transactions level?

    pastedimage1645432478168v1.png

  • PK69 Profile Picture
    177 on at

    Hi ALireza, i need to capture Sales Tax Code on Vocuher transaction Level

  • PK69 Profile Picture
    177 on at

    I have tried to establish an relation based on Journal Number. Please go through the query attached and suggest the needful

    Query :

    SELECT * FROM GENERALJOURNALENTRY LEFT JOIN TAXTRANS ON

    GENERALJOURNALENTRY.SUBLEDGERVOUCHER = TAXTRANS.VOUCHER

    AND GENERALJOURNALENTRY.JOURNALNUMBER = TAXTRANS.JOURNALNUM

    AND GENERALJOURNALENTRY.ACCOUNTINGDATE = TAXTRANS.TRANSDATE

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    305,194 Super User 2026 Season 1 on at

    Hi Prem,

    There is a table in between the GeneralJournalAccountEntry and the TaxTrans table. The name of this table is TaxTransGeneralJournalAccountEntry. It has a reference to both the account entry and the tax transaction. This should be the missing link in your requirement.

  • PK69 Profile Picture
    177 on at

    Hi Andre, How I can join these 3 tables as when I tried to join I can't able to see the required outcome.

    Query : SELECT * FROM GENERALJOURNALACCOUNTENTRY LEFT JOIN TAXTRANSGENERALJOURNALACCOUNTENTRY ON GJAE.RECID = TTGJAE.GENERALJOURNALACCOUNTENTRY

    LEFT JOIN TAXTRANS ON

    TTGJAE.TAXTRANS = TAXTRANS.RECID

    please suggest the needful in the query

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

    Hi Prem,

    What is the current outcome and what exactly are you looking for?

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 698

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 698

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 567 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans