how to find which tables are linked

Hi

I am trying to find out what tables in thr General Ledger are linked to the CUSTINVOICETRANS and CUSTINVOICEJOUR tables in Sales Ledger.

In GL we have setup a Sales Revenue account and a cost of sales account and I would like to create a simple SSRS report that shows data from these tables but I cannot see how the tables are all linked (if all all)

Could some please share with me how to find out. I much prefer how to find out than the answer to the above even though it will help quickly solve my current issue. I am going to be writing a lot of sql queries or SSRS reports and would like to be informed on how to do it than keeping asking here.

I have looked at the ERD from the Microsoft website but it does not show how the tables outside of a module/ledger all link back - or I have misunderstood/missed it.

Thanks for any help - its greatly appreciated.

Sagar

Of course that posting invoices has impact to general ledger, but it obviously consist of many tables, therefore saying “what GL tables are linked to sales invoices” isn’t easy. For example, ledger dimensions are clearly related to invoices, but it may not to be what you’re looking for, so you should narrow the topic.

If you want to see GeneralJournalEntry records related to a sales invoice, click the Voucher button in Invoice journal (CustInvoiceJour) form and examine the query.

See the mapping document that related ledgerTrans(2009) with different tables in AX 2012, The voucher and date are the sources obviously for mapping. The document also has the patterns to fetch to data based on the voucher.

https://technet.microsoft.com/en-us/library/hh292603.aspx