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)

Missing or incorrect ledger account when posting batch/multiple free text invoices

(0) ShareShare
ReportReport
Posted on by

Hello - Hoping someone can help me out...I've been stumped after scouring the internet.

Basically, when the user generates recurring invoices, they generate fine. (he does this as a multi-group) and not selecting a specific customer/template. (below)

But when he goes to post them, they not all of them actually post and I'm thinking that its because they generate the error below.

"One or more accounting distribution is missing a ledger account or contains a ledger account that is not valid.
Use the Accounting distribution form or the Posting profile to update the ledger account."

I searched for this error and all I see are answers as they relate to Purchase Orders, not free text invoices...and since this is done in "batch", I don't see a way to place breakpoints and interactively step through the code.

But he is able to post each individual Invoice, one-at-a-time at the end of each month, but this causes much frustration. This just started happening recently.

I did a search for this particular error within the code and found that its thrown when there is a "0" in the ledger dimension field of the AccountingDistributinon table and ran the same sql query that I found in that method in the AOT, but I found no records with a zero.

There is another condition where it will throw the error but I'm unable to decipher what its checking for without being able to step-thru/runtime and debug...

Can anyone provide insight? thanks.

*This post is locked for comments

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

    Hi Picklepete,

    The second screenshot is too small to be able to read it. Can you repost it? If the user can post them one-by-one, then I do think the setup is correct. There might be an orphaned record which could cause this issue. Did you ask a developer to debug this scenario?

  • Community Member Profile Picture
    on at

    Thanks for your replay Andre` ...the error in the Infolog in the smaller screenshot above is:

    "One or more accounting distribution is missing a ledger account or contains a ledger account that is not valid.

    Use the Accounting distribution form or the Posting profile to update the ledger account."

    I am a developer, but the frustrating part is that I don't know how I can breakpoint/debug the process because I only see the option to batch run the posting process...

    another puzzling problem is that when I did a search for this error in all classes in the AOT (@SYS340058) I commented out the part where the error gets thrown (and also commented out the bit where the validation gets set to false) and the error still gets thrown...

    I've hit a brick wall...

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello picklepete,

    I found three hotfixes on LCS that seems to address the issue described.

    See e.g.

    KB 2965193"One or more accounting distribution is missing a ledger account or contains a ledger account that is not valid" error when posting free text invoices

    Can you check them and verify whether they overcome your issue?

    Best regards,

    Ludwig

  • CU06090812-0 Profile Picture
    2 on at
    Did you ever solve this issue?

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