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 :
Microsoft Dynamics AX (Archived)

Effects of deleting record from LedgerJournalTable

(0) ShareShare
ReportReport
Posted on by 2,174

Hi,

Suppose I have 2   (duplicates, only 1 should have been created)  Posted Journals in LedgerJournalTable each with 2 lines in LedgerJournalTrans (1 vendor, 1 ledger),

and if I called LedgerJournalTable.delete() on 1 of them, then it will delete LedgerJournalTable and LedgerJournalTrans records,

but GeneralJournalEntry, GeneralJournalAccountEntry records will still be there.

Since there is 1 vendor line in each journal, there are 2 vendor lines in VendTrans.

Now I want to reverse 1 Vendor line out of 2.

How shall I proceed? Can't think of a solution right now.

If I create a reversing transaction in LedgerJournalTable/Trans then I would still have dangling entries in GeneralJournalEntry, GeneralJournalAccountEntry of the record that was deleted.

Which tables are used for Ledger module reporting, Ledgerjournaltable/trans or the other set of tables like GeneralJournalEntry, GeneralJournalAccountEntry, etc.?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi MYGz,

    You can try to use the reversal. It will create additional accounting entries. If this reversal is not working, you can create a reversing journal.

    The LedgerJournalTable/Trans tables are worksheet tables which are used for data entry, checking and posting. You should not create transactional reporting on these tables.

    The GeneralJournalEntry/AccountEntry tables are the real posted transactions. These are used for reporting; together with DimensionFocusBalances tables.

  • MYGz Profile Picture
    2,174 on at

    Thank You André.

    Then I think I can go ahead and create reversing entries since only LedgerjournalTable/Trans is affected.

    Creating Reversing entries (debit/credit swapped) with X++ would be easier for me as there are 11k such entries.

  • MYGz Profile Picture
    2,174 on at

    1 last thing.

    If I 'Fix Error' with Consistency Check tool in System Administration > Periodic > Database > Consistency Check,

    will it bring back the deleted transaction in LedgerJournalTable/Trans ? Considering the original deleted journalnum is already consumed by some other transaction because of 'Continuous' Number sequence? Will it bring back to a next JournalNum from the number sequence?

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi MYGz,

    The consistency check will not re-insert deleted ledgerjournaltable/trans tables. These tables are worksheet tables which could be cleaned up after posting.

  • MYGz Profile Picture
    2,174 on at

    Hi André,

    This is a follow up question, As you said LJT/LJTS are worksheet tables and records can be deleted after.

    How shall we programmatically settle a customer invoice if the record in LJTS doesn't exist?

    As you can see here in code, it requires LJTS and CustTransOpen records for settlement:

       manager = CustVendOpenTransManager::construct(ljt);

       manager.updateTransMarked(cto, true);

    [View:http://xhellot.blogspot.com/2016/11/programmatically-settle-payment-journal.html?m=1]

    Is there another method in such a case?

  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi MYGz,

    You can settle customer transactions in several ways. One option is posting the journal. When creating the journal, you can mark customer transactions for settlement. During posting it will update records for this settlement. So before you delete the LJT/LJTS, the settlement was already completed.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans