Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Vend trans and GAE table link

Posted on by 5

Hello 

any one knows how to link the vend transaction table with general journal account entry table? i have tried to link 1) vend trans with GE table 2) GE with GAE table but the output is not the right one 

thanks 

Amal 

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: Vend trans and GAE table link

    Hi Amal,

    I think you need to take one voucher with duplicates and check transactions in D365 to understand what can cause it. Probably you need to add an additional filter for excluding some transactions from GeneralJournalaccountentry.

  • amal Profile Picture
    amal 5 on at
    RE: Vend trans and GAE table link

    hello

    quick update, i still get duplicates records on the vouchers so the result is still not the correct one, any idea on how to delete the duplicates ?

    thanks 

    Amal 

  • amal Profile Picture
    amal 5 on at
    RE: Vend trans and GAE table link

    thanks Sergei, will try this one and see if i get the right result

    will keep you posted

  • Suggested answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: Vend trans and GAE table link

    Hi Amal,

    I can suspect that link by DataAreaId is missing between VendTrans and GJE and you have the same vouchers it could give incorrect output.

    vendTrans.DATAAREAID = Generaljournalentry.SUBLEDGERVOUCHERDATAAREAID

  • amal Profile Picture
    amal 5 on at
    RE: Vend trans and GAE table link

    Hi Sergei

    see below, i am comparing the sum result with vendor to ledger reconciliation report

    not sure if this is the right logic , but i would like the query to sum all the voucher numbers from vend trans that exist in the GAE and the filtered main account and posting type= vendor balance

    Thanks

    Amal

    SELECT        MA.Name AS [Main account name], MA.Value AS [Main Account], GAE.AccountingCurrencyAmount AS [Ledger Balance], GAE.ReportingCurrencyAmount AS [Ledger Balance],

                            std.VendorTransactions.AmountMST AS Expr1, std.VendorTransactions.ReportingCurrencyAmount AS Expr2, GE.SubledgerVoucherDataAreaId

    FROM            std.VendorTransactions INNER JOIN

                            std.Generaljournalentry AS GE INNER JOIN

                            std.GeneralJournalaccountentry AS GAE INNER JOIN

                            dbo.MainAccount AS MA ON GAE.MainAccountId = MA.Id ON GE.RecId = GAE.GeneralJournalEntry ON std.VendorTransactions.Voucher = GE.SubledgerVoucher AND

                            std.VendorTransactions.TransDate = GE.AccountingDate

    WHERE        (GE.AccountingDate BETWEEN CONVERT(DATETIME, '2020-01-01 00:00:00', 102) AND CONVERT(DATETIME, '2020-01-31 00:00:00', 102)) AND (GAE.Postingtype = 41) AND (MA.Value = N'921100')

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: Vend trans and GAE table link

    Hi Amal,

    Could share more details about how you created a query and what you are comparing with?

  • amal Profile Picture
    amal 5 on at
    RE: Vend trans and GAE table link

    thanks Sergei, in fact i have linked the tables as you suggested but when i try to summarize at the main account level then i dont get the right data out

    i am trying to do something similar to the vendor to ledger reconciliation report with all companies overview and both reporting and accounting currencies  

    thanks

    Amal

  • Suggested answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: Vend trans and GAE table link

    Hi amal,

    Are you using GeneralJournalAccountEntryEntity to get data for the report? If yes, it already contains voucher and accounting data fields which can be used to link VendTrans by Voucher and TransDate.

    If you want to use tables, first, you need to link GeneralJournalEntry table by voucher and accounting date as well to VentTrans and after GeneralJournalAccountEntry to GeneralJournalEntry table.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans