Views:
Applies to Product - Dynamics 365 Finance
 
What’s happening?
Posting Logic Failure occurs when the Main Account is not selected in the Expense Category but in subcategories, leading to errors during the posting of expense reports: 
 
“Stopped (error): The state of the source document or source document line could not be updated. One or more accounting distribution is missing a ledger account or contains a ledger account that is not valid.”
 
Reason:
This arises when the Main Account is not defined in the Expense Category while the Main Account is set in the Expense Subcategories. This results in the ledger dimension being set to zero, causing the report posting to fail. Specifically, for each itemized line, the system attempts to find the SubCategoryRecId, and if it is missing, it defaults to the Expense Category, which leads to the failure.
 
Resolution:
This has been addressed in version 10.0.42 and backported in quality updates for version 10.0.41 and 10.0.40. Here you can find build numbers since this is fixed in those versions: Details for issue 953745
 
If you do not plan to upgrade to these version during next days, ensure expense category has got a main account to prevent this error message and to get it posted.