While creating a General Journal and than post journal entries using X++, I received the following error message:
Function DimensionDefaultingEngine::constructForMainAccountId has been incorrectly called.
This issue occurs at below line of code while creating ledger dimension of specific ledger account
As per argument,we are passing a container of dimension values which convert a combination of a main account and financial dimension values into a ledger account RECID.So system trying to locate the record of the hierarchy of the current chart of accounts and with in account structure
When you check The account structure then you will find that Main account is not there.the error message is weird and one can not understand through error that Main Account is missing from account structure.So system will be able to insert value only in case if argument container “Main account and financial dimension values” are configured in ledger account structure.
Whenever a new ledger account is created, one should double check the account structure.