web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,106 on at
    RE: How to join the Generaljournalaccountentry table to the Custtrans table?

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,771

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 806 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 542 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans