Announcements
No record found.
Is there a way of joining the LedgerJournalTrans to the GeneralJournalEntry/GeneralJournalAccountEntry on a 1 to 1 level? Joining through Voucher appears to be a 1 to many relation.
*This post is locked for comments
GeneralJournalEntry tables links to SubledgerGeneralJournalEntry table by the "GeneralJournalEntry" field in SubledgerGeneralJournalEntry table.
and yes it has 1 to many relationship based on voucher, dataareaid and trans date. this is valid.
can you explain what is your exact requirement is ? and what you are looking to achieve ?
Take a look at this job, I hope it helps you to understant the relations between the tables:
static void tutorialAccesLedgerJournalTransVoucher(Args _args) { Ledger ledger = ledger::findByLegalEntity(CompanyInfo::find().RecId); LedgerJournalTrans ledgerJournalTrans; GeneralJournalEntry generalJournalEntry; GeneralJournalAccountEntry generalJournalAccountEntry; DimensionAttributeLevelValueAllView dimensionAttributeLevelValueAllView; DimensionAttribute dimensionAttribute; while select ledgerJournalTrans join generalJournalEntry index hint LedgerAccountingDateIdx where generalJournalEntry.Ledger == ledger.RecId && generalJournalEntry.AccountingDate == ledgerJournalTrans.TransDate && generalJournalEntry.SubledgerVoucher == ledgerJournalTrans.Voucher join generalJournalAccountEntry where generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId { info(strFmt("%1", generalJournalAccountEntry.AccountingCurrencyAmount)); //financial dimensions related to the voucher line while select dimensionAttributeLevelValueAllView where dimensionAttributeLevelValueAllView.ValueCombinationRecId == generalJournalAccountEntry.LedgerDimension join dimensionAttribute where dimensionAttribute.RecId == dimensionAttributeLevelValueAllView.DimensionAttribute { info(strFmt("%1 %2", dimensionAttribute.localizedName(), dimensionAttributeLevelValueAllView.DisplayValue)); } } }
I am trying to join the LedgerJournalTrans to the GeneralJournalAccountEntry on a 1 to 1 relationship for a display method.
I am using LedgerJournalTrans "Txt" field as a way to use description.
Hi,
Please let me know if you have a solution.
Thanks,
karthik.
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Joris dG 5
Sagar Suman 2 Super User 2026 Season 1
Alexey Lekanov 2