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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Can not delete main account in ledger

(0) ShareShare
ReportReport
Posted on by 100

Hi I am trying to delete a main account in ledger in gold environment and there is no transactions and also i have removed them from posting profile also, but it come up with error message"The MainAccount '14010' is used in one or more default accounts and cannot be deleted" tried everything but did not work? any help will be appreciated. 

thanks

ilyas

*This post is locked for comments

I have the same question (0)
  • Peter John Profile Picture
    288 on at
    RE: Can not delete main account in ledger

    Dynamics AX 2012. There will be multiple entries in these tables for a single ledger dimension. Let me explain a hierarchy of these tables here: It start with LedgerDimension field on the table that has a relation to

    DimensionAttributeValueCombination -> DimensionAttributeValueGroupCombination -> DimensionAttributeLevelValue->DimensionAttributeVaue->DimensionAttribute tables. You can take a look at view "DimensionAttributeLevelValueAllView" for detail.

    Now the problem is if there is any reference data in any of the tables the record cannot be deleted. The problem with the approach of how LedgerDimension stores that data is that the data in those tables will not be deleted (for reusability) even you delete the transaction or change the ledger dimension on the transaction so once you use the dimension it will always stay there in the tables.

    The solution will be to make a utility that deletes all the record in those tables that don't have any reference in any other tables. This solution will not harm any of the existing data and when user select the same combination of ledger dimension (that you have deleted) the framework will once again populate the data in these tables.  

  • André Arnaud de Calavon Profile Picture
    298,740 Super User 2025 Season 2 on at
    RE: Can not delete main account in ledger

    Hi Ilyas,

    There are some Dimension...Value tables which can have a reference to this main account. This is also seen as transaction. If the records are created in these tables, then the account was actually used in and probably directly deleted from a general journal or posting setup. It would be possible to find the records in these tables and delete these references. Then deleting would be possible. Try it in a separate environment first. Then also test all other scenarios if nothing is broken.

    Another option might be suspending this account and rename it to another account in future when there is a need for a new main account.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans