web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Record In GeneralJournalAccountEntry / GeneralJournalEntry disappear AX 2012

(0) ShareShare
ReportReport
Posted on by 106

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

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    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.

  • Blue Wang Profile Picture
    on at

    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();
    }

  • raymonmon Profile Picture
    106 on at

    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,

    Raymon

  • Blue Wang Profile Picture
    on at

    Hi Raymon,

    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.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    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).

  • Sergei Minozhenko Profile Picture
    23,093 on at

    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.

  • raymonmon Profile Picture
    106 on at

    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 :)

  • raymonmon Profile Picture
    106 on at

    Hi Sergei,

    So in your case were the GeneralJournalEntry data deleted but the GeneralJournalAccountEntry data remain?

    Regards,

    Raymon

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi raymonmon,

    I think in all cases records from both tables are deleted. Are you using NoLock hint for DW loads a well?

  • raymonmon Profile Picture
    106 on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans