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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

how to build relation between ledgerjournaltrans table and vendbankaccount table

(2) ShareShare
ReportReport
Posted on by 308
Hi All,

  I need to export the vendor payment journal selected  lines to excel through code, for that  I need some fields to export to excel from 'vendbankaccount' table  to fetch into excel.I need to export some fields 'Vend bank name' and 'vend bank account num'. I did not find any direct relation between these 2 tables.


Thanks in Advance.
Categories:
I have the same question (0)
  • Verified answer
    udaY-ch Profile Picture
    5,133 on at
    Hi
     
    You can connect LedgerJournalTrans->VendTable->VendBankAccountTable
     
    
    VendAccount vendAccount = LedgerJournalTrans.AccountType == LedgerJournalACType::Vend ? LedgerJournalTrans.parmAccount() : LedgerJournalTrans.parmOffsetAccount();
    
    vendTable = VendTable::find(vendAccount);
    
    VendbankAccount = VendBankAcocunt::find(VendTable.AccountNum, VendTable.BankAccount);
    
    
    Hope it helps you.
     
    Thanks
    Uday
     

    If you found this answer helpful, kindly mark it as verified so it can assist others facing similar issues.

     
  • Verified answer
    Mohamed Amine Mahmoudi Profile Picture
    26,431 Super User 2025 Season 2 on at
     
    You an use this relation : 
    LedgerJournalTrans.CustVendBankAccountId == VendBankAccount.AccountId
    Best regards,
    Mohamed Amine MAHMOUDI
  • charan12 Profile Picture
    308 on at
    Thanks Uday-ch and mohamed Amine, thanks for you time. Uday-ch, yeah it working fine. 

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans