Views:
Applies to Product - Dynamics 365 Commerce
 
What’s happening?
The customer requires the journal name column for the GeneralJournalAccountEntryStaging entity in BYOD, as this entity is designed without a journal name. The customer has identified another entity, GeneralJournalEntityStaging, which contains the journal name.
 
Reason:
There is no direct relationship between the GeneralJournalAccountEntryStaging and GeneralJournalEntityStaging entities. They need to be joined through different tables.
 
Resolution:
To retrieve the journal name, use the following SQL query to join the relevant tables:
sql SELECT LJTable.JOURNALNAME, * FROM GENERALJOURNALACCOUNTENTRY GJAE JOIN GENERALJOURNALENTRY GJE ON GJE.RECID = GJAE.GENERALJOURNALENTRY JOIN LEDGERJOURNALTRANS LJT ON LJT.DATAAREAID = GJE.SUBLEDGERVOUCHERDATAAREAID AND LJT.VOUCHER = GJE.SUBLEDGERVOUCHER AND LJT.TRANSDATE = GJE.ACCOUNTINGDATE JOIN LEDGERJOURNALTABLE LJTable ON LJTable.DATAAREAID = LJT.DATAAREAID AND LJTable.JOURNALNUM = LJT.JOURNALNUM
Additionally, it is suggested to extend or duplicate the GeneralJournalAccountEntryStaging entity to customize it for the required fields.