The problem is that there is no key value stored in either CustTrans Or
CustTransOpen referred to the records created in the table LedgerJournalTrans.
As Per MS msdn, the relationship between these three tables mentioned above
is clear, however the valus in the related columns in CustTrans and
CustTransOpen do not match with any key value in LedgerJournalTrans.
Relationship As per MS MSDN as follows:
LedgerJournalTrans.MarkedInvoiceCompany == CustTransOpen.dataAreaId
LedgerJournalTrans.MarkedInvoiceRecId == CustTransOpen.RecId
LedgerJournalTrans.CustTransId == CustTrans.RecId
Data in Database for the above mentioned scenario:
LedgerJournalTrans.MarkedInvoiceCompany = ""
LedgerJournalTrans.MarkedInvoiceRecId = 0 LedgerJournalTrans.CustTransId = 0
CustTransOpen.dataAreaId = NuLL CustTransOpen.RecId = 5637149084
CustTrans.RecId = 5637149090
Note: the variation of the values of the columns that should be related.