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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to join the Generaljournalaccountentry table to the Custtrans table?

(1) ShareShare
ReportReport
Posted on by 5

Hello, I need to filter for vouchers beginning with CIV, WO, etc with the ledger account beginning with 113120. To my understanding this requires bringing the ledger account over to the custtrans table. I am a little confused as there is a generaljournalentry and other tables. What is the relationship needed to accomplish this? thanks 

I have the same question (0)
  • Verified answer
    udaY-ch Profile Picture
    5,180 on at

    Hi

    Use custtrans voucher to connect genenraljournalentry table through subledgervoucher

    And from generaljournalentry you will find a connection to generaljournalaccountentry by using recid

    Something like this,

    Public static void voucher(Args _args)
    {
        CustTrans                   custTrans;
        GeneralJournalEntry         generalJournalEntry;
        GeneralJournalAccountEntry  generalJournalAccountEntry;
        
        
        select custTrans
            where custTrans.Voucher == "Yourvoucher"
        join generalJournalEntry
            where generalJournalEntry.SubledgerVoucher == custTrans.Voucher
        join generalJournalAccountEntry
            where generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId
        {
            info(strFmt("generalJournalAccountEntry %1", generalJournalAccountEntry.TransactionCurrencyAmount));
        }
    }

    Uday

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Subra Profile Picture

Subra 270

#3
Martin Dráb Profile Picture

Martin Dráb 243 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans