CUSTINVOICE* tables - duplicate journal challenge

DEDE
Member Posts: 15
I am currently working with a customer OLAP solution modelling a cube for analyzing Customer Invoices. I have to use CUSTINVOICEJOUR to resolve the customer for each invoice line. According to AX documentation, tables CUSTINVOICETRANS and CUSTINVOICEJOUR are related in the following way:
CustInvoiceTrans.SalesId==CustInvoiceJour.SalesId
and
CustInvoiceTrans.InvoiceId==CustInvoiceJour.InvoiceId
and
CustInvoiceTrans.InvoiceDate==CustInvoiceJour.InvoiceDate
and
CustInvoiceTrans.numberSequenceGroup==CustInvoiceJour.numberSequenceGroup
This makes some kind of sense, but in case of this particular customer, there are duplicate entries in CUSTINVOICEJOURNAL where the only difference is RECID. Therefore, my Invoice transactions are duplicated when the two tables are joined!
Any ideas about how this can occur, and maybe how to eliminate the problem? I found a partial answer mentioning tables CUSTINVOICELINE and CUSTINVOICETABLE and that the problem might relate to free text invoices that are actually duplicated to CUSTINVOICEJOUR, but I haven't been able to resolve the details...
I have built similar cubes in the past for other customers, and generally I have seen no problems with building my schema with the relation mentioned.
CustInvoiceTrans.SalesId==CustInvoiceJour.SalesId
and
CustInvoiceTrans.InvoiceId==CustInvoiceJour.InvoiceId
and
CustInvoiceTrans.InvoiceDate==CustInvoiceJour.InvoiceDate
and
CustInvoiceTrans.numberSequenceGroup==CustInvoiceJour.numberSequenceGroup
This makes some kind of sense, but in case of this particular customer, there are duplicate entries in CUSTINVOICEJOURNAL where the only difference is RECID. Therefore, my Invoice transactions are duplicated when the two tables are joined!
Any ideas about how this can occur, and maybe how to eliminate the problem? I found a partial answer mentioning tables CUSTINVOICELINE and CUSTINVOICETABLE and that the problem might relate to free text invoices that are actually duplicated to CUSTINVOICEJOUR, but I haven't been able to resolve the details...
I have built similar cubes in the past for other customers, and generally I have seen no problems with building my schema with the relation mentioned.
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions