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)

How to delete a main account

(0) ShareShare
ReportReport
Posted on by 340

Hi,

I've setup a chart of accounts and shared it bewtween 3 companies.(one of them a test company)
I've attached a "Test" account structure, and made a couple og postings in the test company.

Now it's not possible to delete any accounts in the chart of accounts, even accounts without postings.
An error occour: "A financial dimension value is based on the 116070 record and has been used on a  transaction. You cannot delete the 116070 record"

I've deleted all financial dimensions and all account structures, but still the same error.

Please help.

*This post is locked for comments

I have the same question (0)
  • Andrew K Profile Picture
    5 on at
    Re: AX 2012 How to delete a main account

    I am experiencing a very similar issue with trying to delete a vendor.  Created a vendor, created a AP invoice journal with that vendor, validated it then deleted the journal.  There were no transactions posted to the vendor.  Get the following error message: A financial dimension value is based on the TEST VENDOR 1 record and has been used on a  transaction. You cannot delete the TEST VENDOR 1 record

  • Suggested answer
    Community Member Profile Picture
    on at
    Re: AX 2012 How to delete a main account

    The error means that there are some existing reference records. In your case the records are in DimensionAttributeLevelValue and DimensionAttributeValue table. Whenever you set a ledger dimension on any form these tables filled in and it will stay in the table even you remove the ledger dimension from the form.

    In your case you can remove the data from DimensionAttributeLevelValue and DimensionAttributeValue tables.

    I am assuming that you are working on test environment.

  • Laura Borelli Profile Picture
    20 on at
    Re: AX 2012 How to delete a main account

    Hi, I have a similar problem when I want to modify a main account or delete a bank account that was not used (but defined with a main account).

    The message is the bank account cannot be deleted because the financial dimension related to the account has transactions.

    Now we deleted the bank account entering in the above mentioned tables, but it cannot be the definitive solution. Now we are working on test invironment, implementing a solution for a customer, but in the future the customer must create or delete any bank account (or customer, or suppliers, or main accounts) without our help.

    Thanks

  • Jørgen Dam Knudsen Profile Picture
    340 on at
    Re: AX 2012 How to delete a main account

    Thanks Tabish,

    Could you perhaps explain, the structure and the functionality of the two tables DimensionAttributeLevelValue and DimensionAttributeValue?

    I'm not sure what to delete in theese tables and what the inplications are.

    And as Laura states, is this really the future that many main table data and it requieres developer support to delete main accounts/baknaccounts and others?

  • Verified answer
    Community Member Profile Picture
    on at
    Re: AX 2012 How to delete a main account

    These tables are used in storing data for a Ledger dimension  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 table 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.  

    Thanks,

    Tabish

  • Syed Shabab Mujtaba Profile Picture
    278 on at
    Re: AX 2012 How to delete a main account

    Hi,

    Iam going to prepare production environment, from test environment i have to delete all transactions and have to make Main Accounts values to zero. I am facing challenge making Main account values to zero, please guide me how to make Accounts value to zero for production. Even after deleting all the transactions and data still accounts are holding values.

    Please guide. Awaiting your reply. Thanks in advance

  • Karen Hanley Profile Picture
    815 on at
    RE: AX 2012 How to delete a main account

    Is there any harm in deleting all records from DimensionAttributeLevelValue  Table ?

    Scenario: We imported COA but then customer had so many changes we reimported a new COA instead of appending.  Now I need to delete the first COA but I cant b/c of this error.

          Is there any way in the AOT to determine which account goes to which COA.  For example, account 1000 exists in both COA.  For now, we are just deleting the lower RECID b/c our first COA import is the one we want to delete, but there has got to be a better way to figure this out.  

           Also, if we do delete the wrong one, does it matter?   I dont understand the purpose of this table, but if we deleted all records in the table would we run into issues?

    Thanks!   ( I hope MS builds this utility that you speak of. To have every partner create it seems silly)

  • Community Member Profile Picture
    on at
    RE: AX 2012 How to delete a main account

    The main account table (MainAccount) has a field named LedgerChartOfAccounts, which determines which COA the main account is attached to.

  • Karen Hanley Profile Picture
    815 on at
    RE: AX 2012 How to delete a main account

    Thanks for the response, however the RECID in the DimensionAttributeLevelValue Table does not map to the RECID in the Main Account table.  So if I have account 1000 existing in 2 different LedgerChartofAccounts and I am trying to delete one of them, I dont know which record in the DimensionAttributeLevelValue Table  to delete.

  • Community Member Profile Picture
    on at
    RE: AX 2012 How to delete a main account

    To find out which DimensionAttributeLevelValue record corresponds to the main account, you need to use a few more tables.

    LedgerChartOfAccountStructure --> Links COA to account structure

    DimensionHierarchy --> AKA Account structure table.  Also links to LedgerChartOfAccountsStructure, so you match the MainAccount by COA all the way to the account structure.  

    DimensionAttributeValueGroup --> Stores groups of values for the dimension set, which is linked to both DimensionAttributeLevelValue and DimensionHierarchy.

    So you can start from DimensionAttributeLevelValue and drill back (or join) in this way...

    DimensionAttributeLevelValue.DimensionAttributeValueGroup = DimensionAttributeValueGroup.Recid

    DimensionAttributeValeuGroup.DimensionHierarchy = DimensionHierarchy.Recid

    DimensionHierarchy.Recid = LedgerChartOfAccountsStructure.DimensionHierarchy

    LedgerChartOfAccountsStructure.ChartOfAccounts = MainAccount.LedgerChartOfAccounts

    MainAccount.MainAccountId = 'Your account number'

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
AlissonGodoy Profile Picture

AlissonGodoy 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans