Notifications
Announcements
No record found.
Hi All,
I'm pulling AX data to a datawarehouse which will be used as source data for business intelligence.
I have pulled the data for GeneralJournalAccountEntry table 2 days ago do the datawarehouse, but when I compare the data today, the recid was not found. Is there any scenario in AX that can delete the record in GeneralJournalAccountEntry or GeneralJournalEntry?
Thanks!
Raymon
Yes, seems that in some scenarios data can be deleted.
I see many methods with name delete* in GeneralJournalAccountEntry and GeneralJournalEtry tables. You can utilize cross references to find which processes use them.
Hi Raymon,
Have you searched for it as suggested?
Such as to remove the trial balance, you will find this:
while select forUpdate generalJournalEntry where generalJournalEntry.LedgerEntryJournal == ledgerEntryJournal.RecId { delete_from generalJournalAccountEntry where generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId; generalJournalEntry.delete(); }
yes, I notice this. but is it possible to have a line in generaljournalaccountentry which refers to genereljournalentry that does not exist?
SELECT * FROM GENERALJOURNALACCOUNTENTRY WITH (NOLOCK) WHERE GENERALJOURNALENTRY NOT IN (
SELECT RECID FROM GENERALJOURNALENTRY WITH (NOLOCK)
)
I tried this query and it returns about 1000 lines of GeneralJournalAccountEntry which GeneralJournalEntry RecId doesn't exist
Regards,
Now that you have obtained non-existent data through queries, there is reason to believe that it is possible.
You can query through SSMS to compare.
You asked if it's possible. But you already found such records so clearly it is possible :)
Again looking at the system, you can see that relation from GeneralJournalAccountEntry to GeneralJournalEntry has related table cardinality "ZeroOne" which means that there could be 0-1 related GeneralJournalEntry records.
Also, there is no delete action that would always delete GeneralJournalAccountEntry records if GeneralJournalEntry is deleted.
I have no idea what kind of situation would cause such data, but at least it's not prevented technically (and if it were, you would not see such data).
Hi raymonmon,
As far as I know "Fiscal year close" process can generate GJ transactions for optimization purpose and delete them after. I had the same case with D365 F&O.
Hi Nikolaos,
Right, I should have rephrased. I just wanted to know what process in AX that can cause such data. Anyway, thanks for your response :)
Hi Sergei,
So in your case were the GeneralJournalEntry data deleted but the GeneralJournalAccountEntry data remain?
I think in all cases records from both tables are deleted. Are you using NoLock hint for DW loads a well?
I'm not sure about this, need to ask the technical team. For my case, is it okay to just exclude the data in GeneralJournalAccountEntry without the GeneralJournalEntry?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 544 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader