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

Joining GeneralJournalEntry and VendTable

(3) ShareShare
ReportReport
Posted on by 11
Hi all,
 
Hope this is the appropriate forum.
 
I'm part of a team implementing a BI solution with D365 data.
For now, the way we've identified vendors for our financial entries was through following joins (which is also what I see when I investigate the relationship online):
FROM d365fo_generaljournalentry gje
LEFT JOIN d365fo_generaljournalaccountentry gjae
    ON gje.recid = gjae.generaljournalentry
    AND gje.dataareaid = gjae.dataareaid
LEFT JOIN d365fo_vendtrans vt
    ON gje.subledgervoucher = vt.voucher
    AND gje.subledgervoucherdataareaid = vt.dataareaid
 
However, when I do this, we have some specific entries that get duplicated, which is because the finance entry voucher and the vendor transaction voucher has multiple vendors present.
 
To illustrate the issue, here's a COUNT(1) on the query with and without the VendTrans join (both use same filters):
 
 
Here's a snippet of the voucher when we look in the VendTrans view in D365 (each line represents a payment to a vendor):
 
 
How do I go about finding the right vendor for the right row in GeneralJournalAccountEntry?
The ideal solution would be the ability to join VendTable to it, but it seems it goes through VendTrans?
Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,729 Super User 2026 Season 1 on at
    Hi SperlingL,
     
    Can you tell what should be the end result of your query? What is your expected outcome? Note that for one GJE record, there are already multiple GJAE records.
  • SperlingL Profile Picture
    11 on at
    Hi André,
     
    I'm interested in making a fact table for a star scheme datamodel, where I have my financial entries, and a column which represents the vendor the associated GJAE record has.
     
    So in a simple case where we have one voucher (1 GJE record), with 2 entries (2 GJAE records), I want to show the two vendors associated with the GJAE records.
    Since the current method I've seen online is joining VendTrans, my join will multiply the 2 GJAE records with the 2 VendTrans records, so I now have 4 rows instead of 2.
  • Suggested answer
    BillurSamdancioglu Profile Picture
    20,825 Most Valuable Professional on at
    If you want to match vendor and GL, the it is beteer to use one vendor transaction to one voucher.
  • SperlingL Profile Picture
    11 on at
    Hi Billur,
     
    I'm unsure how this adds to the conversation - that is what I'm doing, having issues with, and looking for a solution for.
    I'm finding a GL voucher and the associated vendor transaction and joining them together.
    To me it seems like there is a missing aspect in the join, but I've tried myself and looked online without success.
     
    The GL voucher has 55 rows with payments.
    The same voucher in VendTrans has 53 rows with payments.
     
    So when joining them together with the shown relationship I get 55 * 53 rows = 2915.
  • Anton Venter Profile Picture
    20,680 Super User 2026 Season 1 on at
    Actually, Billur has a valid point. The issue is your system creates the same voucher for multiple vendor transactions. This makes the join impossible. To join the Ledger and the sub ledger, one of the fields you need to use is Voucher. If the voucher is unique per vendor transaction, it makes the join possible. There is no other way to join the data, there is no relation defined, it's a loose relation.

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 620

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans