What's the link between the MainAccount table and LedgerJournalTrans

Hi,

I’m trying to get all the LedgerJournalTrans for a certain Account Number from (MainAccount) table. I’ve tried to find the link between the two tables, but couldn’t find any! Any help is appreciated!

Thanks!

Take LedgerJournalTrans.LedgerDimension and find a record in DimensionAttributeValueCombination table. Then use MainAccount field to find a record in MainAccount table.

Or simply call LedgerJournalTrans.findMainAccount(). You’ll also see that there are additional checks for AccountType and inter-company logic.

Well, there’s another view that does the job perfectly, it’s MAINACCOUNTLEDGERDIMENSIONVIEW.

Thanks Martin

What about LedgerJournalTrans rows where the Account Type is not Ledger?

For example, vendor payment journal lines have an Account Type of Vendor and an Offset Account Type of Bank. How do you find out what main account(s) that transaction is for?